In this study, a model predictive control (MPC) method is used to control a four-leg voltage source inverter in a stand-alone microgrid. The proposed method aims to regulate the voltage of the inverter so that the cost function of the MPC becomes minimum. Minimizing the cost function, the output voltages will become balanced even under unbalanced load conditions. The suggested controller is validated through Simulink/Matlab. Moreover, the outcomes are compared with the conventional double-loop proportional-integral controller. It is shown that the output voltages have lower THD and phase unbalance rate using the suggested MPC. Next, it is argued that neither of these methods can have control over neutral-toground voltage, which is a critical power quality issue in microgrids with sensitive loads. Since the MPC has the potential to consider several parameters, it is recommended to manipulate the MPC cost function to compensate for output voltages and reduce the neutral-to-ground voltage, simultaneously.