The establishment of wireless connection area and the continuation of it have been a significant problem in Wireless Sensor Networks (WSN) up to now because WSNs enable us to watch various environments with military and civil applications and at the same time, they give the opportunity of evaluating the information gained from such environments through the transmission of it to a certain control point. Thus, k-coverage problem in dynamic deployment of sensor nodes in WSNs is one of the reasons that affetcs the performance and the continuity of the network. For this reason; the algorithm Maximum Target Detection Algorithm based on ElectromagnetismLike (MTDA-EM), which enables us to detect all the targets in the related area at maximum level and additionally provides the dynamic deployment of the sensors with overlap of the minimum number of nodes, has been proposed. MTDA-EM has been improved based on Electromagnetism-Like (EM) algorithm which is metaheuristic. The aim in proposed MTDA-EM; is to decrease the energy consumption of the nodes and increase the lifetime of the network by optimizing the k-coverage degrees of the sensors while the dynamic deployment of the nodes in the related area is being made. Simulation results; it has been observed that the improved MTDAEM has provided optimum results in terms of solving the problems of k-coverage.