The concept of microgrid was first introduced in 2001 as a solution for reliable integration of distributed generation and for harnessing their multiple advantages. Specific control and energy management systems must be designed for the microgrid operation in order to ensure reliable, secure and economical operation; either in grid-connected or stand-alone operating mode. The problem of energy management in microgrids consists of finding the optimal or near optimal unit commitment and dispatch of the available sources and energy storage systems so that certain selected criteria are achieved. In most cases, energy management problem do not satisfy the Bellman's principle of optimality because of the energy storage systems. Consequently, in this paper, an original fast heuristic algorithm for the energy management on stand-alone microgrids, which avoids wastage of the existing renewable potential at each time interval, is presented. A typical test microgrid has been analysed in order to demonstrate the accuracy and the promptness of the proposed algorithm. The obtained cost of energy is low (the quality of the solution is high), the primary adjustment reserve is correspondingly assured by the energy storage system and the execution runtime is very short (a fast algorithm). Furthermore, the proposed algorithm can be used for real-time energy management systems.