© 2022, The Author(s), under exclusive license to Springer Nature Switzerland AG.Increased usage of smart meters enables information exchange between customers and utility providers in smart grid systems. Nowadays, the cloud-centric architecture has become a bottleneck for the decentralized and data-driven microgrids evolving from centralized Smart grids. Hence, fog computing is an appropriate paradigm to build distributed, latency-aware, and privacy-preserving energy demand applications in microgrid systems. In this work, we proposed a 3-tier architecture of a microgrid energy demand management system comprising edge, fog, and cloud layers. We set up a simulation environment where Raspberry Pi devices act as fog nodes and resource-efficient Docker applications run on these nodes. As the main contribution of the work, we developed a short-term load forecasting application based on an ensemble model that integrates support vector regression (SVR) and long-short term memory (LSTM) by leveraging the potential of distributed and low-latency fog nodes for complex models. We evaluated the forecasting model deployed in a fog-based simulation environment using the public REFIT Electrical Load dataset. We also tested the deployed fog-based simulation environment based on latency and execution time metrics.