Energy management systems (EMS) are vital supervisory control tools used to optimally operate and schedule Microgrids (MG). In this paper, an EMS algorithm based on mixed-integer nonlinear programming (MINLP) is presented for MG in islanding mode considering different scenarios. A local energy market (LEM) is also proposed with in this EMS to obtain the cheapest price, maximizing the utilization of distributed energy resources. The proposed energy management is based on LEM and allows scheduling the MG generation with minimum information shared sent by generation units. Load demand management is carried out by demand response concept to improve reliability and efficiency as well as to reduce the total cost of energy (COE). Simulations are performed with real data to test the performance and accuracy of the proposed algorithm. The proposed algorithm is experimentally tested to evaluate processing speed as well as to validate the results obtained from the simulation setup on a real MG Testbed. The results of the EMS-MINLP based on LEM are compared with a conventional EMS based on LEM. Simulation and experimental results show the effectiveness of the proposed algorithm which provides a reduction of 15% in COE, in comparison with conventional EMS.