The islanded operation mode of a microgrid system is usually affected by the system uncertainties, such as the load, source, and parameter variations. In such systems, the voltage and frequency must be regulated to maintain the power quality during islanded operation. As an approach to control the voltage and frequency, in this study, a decentralized nonlinear integral backstepping controller for the voltage source inverter used in an islanded microgrid is developed. First, the dynamical model of the inverter-based distribution generations (DGs) in microgrid system is developed. Subsequently, the model-based controller for the microgrid is built using dynamics of inverter-based DGs and Lyapunov theory, which could eliminate the voltage and frequency deviations in the system under different uncertainties. To ensure the system stability, a control Lyapunov function is adopted. Considering the influence of irradiations and other meteorological variables fluctuations a battery energy storage (BESS) is applied on the DC side to suppress the fluctuations of output power of DGs. Furthermore, the efficiency of the designed controller was validated through simulations in the MATLAB/Simulink environment under different scenarios and effectiveness of the proposed framework is further validated by real-time hardware in loop (HIL) experiments. In addition, the performance of the proposed controller is compared with a conventional backstepping (BS) controller. The comparison results demonstrate that the efficiency of the designed controller in terms of obtaining steady-state operating conditions is better than that of the BS controller.