With constructions of demonstrative microgrids, the realistic optimal economic dispatch and energy management system are required eagerly. However, most current works usually give some simplifications on the modeling of microgrids. This paper presents an optimal day-ahead scheduling model for a microgrid system with photovoltaic cells, wind turbine units, diesel generators and battery storage systems. The power flow constraints are introduced into the scheduling model in order to show some necessary properties in the low voltage distribution network of microgrids. Besides a hybrid harmony search algorithm with differential evolution (HSDE) approach to the optimization problem is proposed. Some improvements such as the dynamic F and CR, the improved mutation, the additional competition and the discrete difference operation have been integrated into the proposed algorithm in order to obtain the competitive results efficiently. The numerical results for several test microgrids adopting the IEEE 9-bus, IEEE 39-bus and IEEE 57-bus systems to represent their transmission networks are employed to show the effectiveness and validity of the proposed model and algorithm. Not only the normal operation mode but also some typical fault modes are used to verify the proposed approach and the simulations show the competitiveness of the HSDE algorithm.