Abstract In this study, the capability of the recently introduced moth swarm algorithm (MSA) was compared with two robust metaheuristic algorithms: the harmony search (HS) algorithm and the imperialist competitive algorithm (ICA). First, the performance of these algorithms was assessed by seven benchmark functions having 2–30 dimensions. Next, they were compared for optimization of the complex problem of four-reservoir and 10-reservoir systems operation. Furthermore, the results of these algorithms were compared with nine other metaheuristic algorithms. Sensitivity analysis was performed to determine the appropriate values of the algorithms’ parameters. The statistical indices coefficient of determination (R2), root mean square error (RMSE), mean absolute error (MAE), mean square error (MSE), normalized MSE (NMSE), mean absolute percentage error (MAPE), and Willmott’s index of agreement (d) were used to compare the algorithms’ performance. The results showed that MSA was the superior algorithm for solving all benchmark functions in terms of obtaining the optimal value and saving CPU usage. ICA and HS were ranked next. When the dimensions of the problem were increased, the performance of ICA and HS dropped but MSA has still performed extremely well. In addition, the minimum CPU usage and the best solutions for the optimal operation of the four-reservoir system were obtained by MSA, with values of 269.7 seconds and 308.83, which are very close to the global optimum solution. Corresponding values for ICA were 486.73 seconds and 306.47 and for HS were 638.61 seconds and 264.61, which ranked them next. Similar results were observed for the 10-reservoir system; the CPU time and optimal value obtained by MSA were 722.5 seconds and 1,195.58 while for ICA they were 1,421.62 seconds and 1,136.22 and for HS they were 1,963.41 seconds and 1,060.76. The R2 and RMSE values achieved by MSA were 0.951 and 0.528 for the four-reservoir system and 0.985 and 0.521 for the 10-reservoir system, which demonstrated the outstanding performance of this algorithm in the optimal operation of multi-reservoir systems. In a general comparison, it was concluded that among the 12 algorithms investigated, MSA was the best, and it is recommended as a robust and promising tool in the optimal operation of multi-reservoir systems.