Actually, path planning is one of the most crucial aspects of mobile robots study. The primary goal of this research is to develop a solution to the path planning issues that occur when a “mobile robot” operates in a static environment. The problem is handled by finding a collision-free path that meets the given criteria for the shortest distance with quite the smoothness of the path. Two nature-inspired metaheuristic algorithms are used in the computation. By leading a hybrid “gray wolf optimization” with the “particle swarm optimization” (HGWO-PSO) computation that restricts the distance and follows path perfection guidelines, the primary shape is improved. In addition, simulation findings reveal that the proposed HGWO-PSO method is deeply serious in terms of path optimality when compared to path planning approaches such as group search optimizer GSO, PSO, artificial bee colony ABC, and GWO.