This paper proposed a red deer algorithm (RDA)-based selective harmonic elimination (SHE) method for multilevel inverters (MLIs). To eliminate the desired harmonic orders, the optimum switching angles of the MLI have been calculated using the proposed RDA. The calculated switching angles have been applied to the 3-phase cascaded H-bridged 11-level inverter. In addition, the performance of the proposed RDA method was compared with the results of methods such as the Newton-Raphson (NR) method, LSHADE/EpSin technique (LSHADE), whale optimization algorithm (WOA), and particle swarm optimization (PSO) used for the SHE problem in the literature. The results obtained prove that the proposed RDA optimization solves the SHE problems more effectively than other methods. It has also been observed that RDA produces good solutions in different modulation indexes.