This paper presents a novel energy management system (EMS) for a microgrid to enhance the power system security in a cost-effective manner. Small size of the islanded microgrids, high levels of intermittency and energy fluctuations, lower inertia potential of inverter-interfaced distributed energy resources (DERs) makes the frequency a vital factor in the microgrid energy management system that should be managed subject to the economic–environmental policies of the microgrid EMS. The proposed model is based on precise energy and reserve scheduling of the DERs in a droop-controlled islanded microgrid to manage the possible microgrid frequency excursions. The expected value of the microgrid frequency excursions stem from system power deviations is employed as a new objective function in this study, which is aimed to be minimized using a two stage stochastic mixed-integer linear programming method. In order to model the hierarchical control structure of the islanded microgrid, the frequency dependent behavior of the droop-controlled inverter-interfaced DERs is formulated thoroughly. The proposed model is applied to a typical microgrid test system. The primary and secondary frequency control reserves are appropriately scheduled over a 24 h period. A methodology based on the Monte-Carlo simulation strategy is adapted to generate some random scenarios corresponding to renewable generation variations, load consumption deviations and contingencies of line/unit outages. The generated scenarios are reduced and applied to the optimization approach. Moreover, using the proposed hierarchical control structure, the microgrid frequency excursions are managed aptly in predefined acceptable ranges by readjusting the reference power set-points of dispatchable DERs. Numerical results and detailed analyses effectively verify the great importance of the frequency control modeling in the energy and reserve management problem of the microgrids.