This paper discusses a method for minimizing the total harmonic distortion (THD) in the output voltage of a 9-level asymmetric single-phase cascaded multilevel inverter using a genetic algorithm to optimize switching angles. The proposed method reduces THD effectively without changing the conventional switching algorithm, making it applicable to various types of multilevel inverters. Simulation results demonstrate the effectiveness and accuracy of this optimization approach, confirming its potential for enhancing output power quality in inverters.