This paper presents a robust nonlinear distributed controller design for islanded operation of microgrids in order to maintain active and reactive power balance. In this paper, microgrids are considered as inverter-dominated networks integrated with renewable energy sources (RESs) and battery energy storage systems (BESSs), where solar photovoltaic generators act as RESs and plug-in hybrid electric vehicles as BESSs to supply power into the grid. The proposed controller is designed by using partial feedback linearization and the robustness of this control scheme is ensured by considering structured uncertainties within the RESs and BESSs. An approach for modeling the uncertainties through the satisfaction of matching conditions is also provided in this paper. The proposed distributed control scheme requires information from local and neighboring generators to communicate with each other and the communication among RESs, BESSs, and control centers is developed by using the concept of the graph theory. Finally, the performance of the proposed robust controller is demonstrated on a test microgrid and simulation results indicate the superiority of the proposed scheme under different operating conditions as compared to a linear-quadratic-regulator-based controller.