The control of the current injected into the grid with lower harmonics is considered as one of the most important issues for the grid integration of distributed energy resources (DERs). The unbalances and harmonics in the grid voltage usually pollute the current injected into the grid due to the power electronic interfaces, for example, inverters. To address such problems, the present paper proposes a nonlinear higher order sliding mode controller (HOSMC) for grid-connected three-phase inverters with LCL filters in order to control the current injected into grid and improve the power quality. The proposed current controller injects the desired current into the grid with lower values of total harmonic distortions (THDs) under any grid voltage condition as well as it reduces the harmonics in the grid voltage. Apart from these, the proposed scheme is developed to provide robustness against parametric uncertainties where these uncertainties are modeled using the Taylor series expansion method. Finally, the performance of the system is evaluated using processor-in-loop (PIL) simulations via MATLAB/Simulink platform through the implementation on a system considering the capacity of the DER as 2 kVA per phase and compared with other existing control strategies.