-In this paper, an optimal solution to the harmonic reduction problem in a cascaded multilevel inverter with non-equal DC sources using a genetic algorithm (GA) is presented. Switching angles are generated for different values of modulation index by the proposed algorithm, considering minimum voltage total harmonic distortion (THD) whereas selected harmonics are controlled within the allowable limits at all desired modulation indices including the point of discontinuity. Results are stored as a look-up table to be used to control the inverter for a certain operating point. The computed angles are used in a simulated circuit in Matlab\Simulink to validate the results.