Several applications have exploited wireless sensor networks (WSNs), and localization is a key WSN technology. The range-free localization technique is substantially less expensive than conventional range-based localization strategies since it does not require distance or angle measurements between the anchor and unknown nodes. The Distance Vector-Hop (DV-Hop) technique is a widespread localization solution for WSNs because of its straightforward theory and minimal cost. The coordinate estimating precision of the classic DV-Hop algorithm needs further improvement due to its large localization error. In this paper, a DV-Hop-based method utilizing modified optimum anchor node subset (MOANS DV-Hop) is proposed to improve the localization performance of the DV-Hop algorithm. A strategy for anchor node deployment is proposed. An objective function is formulated to minimize the error in estimating coordinates of unknown nodes. With the MOANS DV-Hop algorithm, each anchor node first uses other anchor nodes to locate itself, then uses the Scaled General Learning Equilibrium Optimizer (SGLEO) algorithm to create an optimal subset made up of anchor nodes other than itself. The anchor node then updates its average hop size using the anchor node subset and broadcasts both the updated hop size and the anchor node subset to the nearby unknown nodes. An unknown node then determines its location using the Equilibrium Optimizer (EO) algorithm, the anchor node subset, and the updated hop size received from the closest anchor node. Simulation findings show that MOANS DV-Hop algorithm has a greater level of localization accuracy in coordinate estimation than both the classical and other improved DV-Hop methods.