With the increasing numbers of high-voltage direct current transmission (HVDC) projects based on the modular multilevel converter (MMC), the power quality of the grid-connected MMC has drawn attention. By using peripheral filtering equipment to mitigate the background harmonic effect on MMC leads to several numbers of problems, e.g., high costs, difficulty in parameter tuning, the resonance problem, etc. Therefore, this paper focuses on the mitigation of harmonic pollution for the MMC controller without filters. Based on the multi-layer coordinate transformation structures, a novel nested decoupled synchronous reference frame (NDSRF) transformation technique is presented to attain the harmonics compensation in the coordinate transformation process. Besides, analyses of the proposed NDSRF coordinate transformation technique, including harmonics transfer rules and harmonics rejection principles, are further given in the time domain. Furthermore, to reduce the harmonic content of MMC output voltages in case of a power grid with serious harmonic pollution, the harmonic resistant MMC controller based on the NDSRF technique is proposed. Finally, the simulation results are demonstrated to validate the background harmonic suppression function of the harmonic resistant MMC controller based on the NDSRF transformation technique. INDEX TERMS MMC, power quality, d-q decoupled controller, harmonic transfer, coordinate transformation.