The rapid growth in renewable energies has given rise to their integration into the grid system. These renewable and clean energy sources are dependent on external conditions such as wind speed, solar irradiation, and temperature. For a stable connection between these sources and power grid systems, a controller is necessary to regulate the system’s closed-loop dynamic behavior. A sliding mode control (SMC) using a new reaching law is proposed for the integration of a Modified Capacitor-Assisted Extended Boost (MCAEB) quasi-Z Source 7 level 18 switch inverter with the grid. An SMC-based controller was implemented to regulate the current flow between the inverter and the grid. SMC has the advantages of ease of implementation, robustness, and invariance to disturbance. The simulation results of SMC and the proportional integral (PI) controller are compared in terms of settling time, steady-state error, and total harmonic distortion (THD) during transient response, steady-state response and step response under different operating conditions. A hardware-in-loop (HIL)-based experimental setup of MCAEB quasi-Z source multilevel inverter was implemented using OPAL-RT. The performance of the proposed controller was further validated by implementing it on DSPACE-1202.