The traveling salesman problem (TSP) is one of the most important issues in combinatorial optimization problems that are used in many engineering sciences and has attracted the attention of many scientists and researchers. In this issue, a salesman starts to move from a desired node called warehouse and returns to the starting place after meeting n customers provided that each customer is only met once. The aim of this issue is to determine a cycle with a minimum cost for this salesman. One of the major weaknesses of the PSO algorithm in the classical version is that it gets stuck in local optimizations. Therefore, in the proposed algorithm, called MPSO, the best solution in the current iteration is also used in the movement step. In addition, a variety of local search algorithms are provided that are used when better answers are generated than before. Also, a new method for moving the particle towards the best particle is presented, which, in addition to probably increasing the quality of the new answer, prevents the premature convergence of the algorithm due to consideration of the concept of random. The results evaluated with the results of several metaheuristic algorithms in the literature show the efficiency of the MPSO algorithm because it has been able to achieve excellent solutions in most of these instances.