The analysis of structures and, in particular, the determination of their failure mode are the basic requirements in the field of civil engineering. Obtaining this information in high-rise structures or structures with complex irregular layouts is a difficult process, which even with the use of specialized computer software is very time-consuming. In recent years, meta-heuristic algorithms have been used extensively in engineering optimization problems. This research presents an automated approach to assess plastic loads and failure modes of two-dimensional frames, in which the plastic analysis of moment frames has been optimized using the modified dolphin echolocation optimization algorithm. This method is based on the creation of the basic collapse mechanisms, which, following their combination, should reach the minimum coefficient of plastic collapse loads using virtual work theory. The efficiency of this algorithm is verified using four sample frames, which, their exact solution including minimum load factor and the corresponding critical failure mode of the structure, exit in other research. Comparison of the results shows that the proposed method provides very good results with high precision and speed and also demonstrates the failure mechanism of the structure. Meanwhile, the modifications made in this method have greatly reduced the volume of calculations. Moreover, applying changes to the dolphin echolocation optimization algorithm led to the use of this optimization algorithm for binary problems for the first time, which ultimately resulted in a good convergence rate.