The floating dc capacitor voltage of modular multilevel converter based STATCOM (M-STATCOM) contains a large amount of low-order harmonic components, which produce current ripple in leg currents, and then greatly affect the output performance and safe operation of M-STATCOM. However, fewer papers have made explicit harmonic analysis on the floating capacitor voltage of M-STATCOM. Detailed floating capacitor voltage computation has been developed using the switching functions concept. Moreover, a quasi-harmonic elimination technique has been proposed to achieve low-order harmonic elimination of leg currents without any external circuit. When the modified switching function is applied, the output leg currents of M-STATCOM are independent from the voltage fluctuation of floating capacitors. The effectiveness of the proposed quasi-harmonic elimination technique and the feasibility of theoretical analysis were verified by the simulation results and experimental results.