The high penetration of distributed generation systems poses challenges in effectively managing both DC bus voltage and power‐sharing in DC microgrids (MGs). To ensure precise voltage regulation across various distributed generation systems and maintain overall system stability, this paper studies the modelling and control of an islanded DC MG described by a set of nonlinear‐nonaffine differential equations. In the proposed DC MG, a battery storage, a photovoltaic (PV) power plant, and a back‐end power converter with DC loads have been connected to a common DC bus. First, a dynamic model of a DC MG was developed. Then, to find the maximum power point of solar PV, a straightforward method based on an artificial neural net is employed. Afterward, a nonlinear local state feedback controller through output regulation theory is applied to achieve voltage stability, overcoming the drawbacks of droop‐based techniques. Moreover, partial state feedback capability simplifies controller design. To verify the effectiveness of the proposed approach, various scenarios, including sudden load variation, illumination change, and changes in the MG configuration, have been examined. Finally, numerical studies were carried out in a simulation environment to demonstrate the superiority of the proposed nonlinear control scheme over constant feedback control.