The use of combined heat and power (CHP) systems has recently increased due to their high combined efficiency and low emissions. Using CHP systems in behind-the-meter applications, however, can introduce some challenges. Firstly, the CHP system must operate in load-following mode to prevent power export to the grid. Secondly, if the load drops below a predefined threshold, the engine will operate at a lower temperature and hence lower efficiency, as the fuel is only half-burnt, creating significant emissions. The aforementioned issues may be solved by combining CHP with a battery energy storage system (BESS); however, the dispatch of CHP and BESS must be optimised. Offline optimisation methods based on load prediction will not prevent power export to the grid due to prediction errors. Therefore, this paper proposes a real-time Energy Management System (EMS) using a combination of Long Short-Term Memory (LSTM) neural networks, Mixed Integer Linear Programming (MILP), and Receding Horizon (RH) control strategy. The RH control strategy is suggested to reduce the impact of prediction errors and enable real-time implementation of the EMS exploiting actual generation and demand data on the day. Simulation results show that the proposed method can prevent power export to the grid and reduce the operational cost by 8.75% compared to the offline method.