A multi-energy microgrid (MEMG) consisting of different forms of distributed generation, e.g., combined heat and power (CHP) units and renewable distributed energy resources (RDERs), is considered as a key technology for accommodating RDERs and for the introduction of multiple forms of energy sources into the electricity market due to the multi-energy complementarity and flexible operation modes. However, the MEMG is subject to source and demand uncertainties which are the primary obstacles to its market participation. The source and demand uncertainties will pose serious challenges to the management of the MEMG and incur the penalty cost to participate in the real-time market. To minimize the operational cost, a multi-stage optimal energy management system (EMS) for participating in the deregulated electricity market considering the cost of market participation and the additional cost (e.g. the purchasing natural gas cost and the depreciation cost of energy storage system) is proposed in this paper. The proposed EMS consists of forecasting stage, day-ahead scheduling stage and real-time dispatch stage. The long short-term memory (LSTM) is adopted for day-ahead data forecasting during the forecasting stage. In the day-ahead scheduling stage, the cost for participating in the day-ahead market (DM) is minimized based on the forecasted data. In the real-time dispatch stage, the cost for participating in the intraday balancing market (IBM) and the additional cost are minimized based on the rolling model predictive control (MPC) method. The proposed method is verified and compared with benchmark solutions. The numerical results demonstrate that the proposed solution can outperform the benchmark solutions and reduce the peak-to-average ratio of the total net-load of multiple MEMGs.