This paper presents a current controller for the single-phase grid-connected modular multilevel converter of 2n + 1 levels. The controller is designed based on the mathematical model of the converter. It has the aim of injecting an almost pure sinusoidal current with a proper phase, despite the low-frequency harmonics present on the grid voltage. Also, a loop for the circulating current is developed to keep this variable close to a constant value for proper internal operation of the converter. The overall current controller comprises injected and circulating current loops. Out of these loops, a voltage reference for each converter arm is built, which is then used in a phase-shift carrier-based pulse-width modulation to generate the switching sequences. These are then used to command the modules conforming the converter. Experimental results in a 7-level modular multilevel converter (n = 3) operating under harmonic distortion in the grid voltage are obtained from a hardware-in-the-loop test bench to validate the performance of the proposed current controller. n, number of cells in one arm of MMC; L, inductance of each arm; i P , i N , upper and lower arm currents; E, DC-link voltage value; v S , distorted grid voltage; e P , e N , total inserted voltage for the upper and the lower arms; v Ci , i-th (i ∈ 1, … , 2n) capacitor voltage of MMC; u i , i-th switching signal of MMC; C, capacitors' capacitance; z i , capacitors' scaled energy; i 0 , injected current to the AC side; e D , difference between the produced voltages of the lower and the upper arms; i T , circulating current; e T , total voltage produced by the upper and lower cells; z P , z N , upper and lower cells' scaled energy; z T , total scaled energy stored in the upper and the lower cells; z D , difference between the scaled energy of the upper and the lower cells; 0 , fundamental frequency of the grid voltage; i * 0 , reference for the injected current; P 0 , constant load power reference; v S,RMS , RMS value of the grid voltage;v S,1 , estimation of the grid voltage fundamental component; t, time; i * T , reference for the circulating current; e * D , e * T , steady-state expressions for e D and e T ;ĩ 0 , error of the injected current loop; D , harmonic disturbance in the injected current loop; R D , damping gain of the injected current loop;̂D, estimate for the harmonic perturbations grouped in D ; k, odd harmonics number; D,k , estimation gains for the resonant filters; s, complex variable; f 0 , fundamental frequency (in Hz) of the grid voltage; T kr , desired response time for each harmonic component; i0