This paper introduces an effective Selective Harmonic Elimination (SHE) modulation technique in a five, seven, and nine-level cascaded H-bridge (CHB) multilevel inverter (MLI). Minimization of the harmonics and device counts is the basis for the ongoing research in the area of MLI. Reduced harmonics and hence the lower Total Harmonic Distortion (THD), improve the output power quality. SHE is a low-frequency modulation scheme to achieve this goal. SHE techniques are used to eliminate the distinct lower-order harmonics by determining the optimum switching angles. These angles are evaluated by solving the non-linear transcendental equations using any optimization technique. For this purpose, the Crystal Structure Algorithm (CryStAl) has been used in this paper. It is a metaheuristic, nature-inspired, and highly efficient optimization technique. CryStAl is a simple and parameter-free algorithm that doesn’t require the determination of any internal parameter during the optimization process. It is based on the concept of crystal structure formation by joining the basis and lattice point. This natural occurrence can be realized in crystalline minerals in their symmetrically organized components: ions, atoms, and molecules. The concept has been utilized to solve non-linear transcendental equations. SIMULINK/MATLAB environment has been used for the simulation. The simulation result shows that the crystal structure algorithm is very effective and excels the other metaheuristic algorithm. Hardware results validate the performance.