Clustering plays a vital role in extending the lifespan and optimized direction of a wireless sensor network by integrating sensor nodes through clusters and choosing cluster heads (CHs) and non-cluster heads (NCHs). Cluster head aggregated data and non-cluster heads forward to the base station (BS). In this paper, we have introduced a new Dynamic Multipath Routing Protocol (DMPRP) for selections of cluster heads (CHs) and non-cluster heads (NCHs), which is ideally selected using M-PSO algorithm. After calculating the probabilities, the best selection of cluster heads has taken, and results have used to find the optimized shortest path using the Genetic Algorithm (GA). The GA algorithm uses an objective function consisting of a network to determine the optimal path.