Shipboard microgrids (SMGs) are distinguished by the heavy propulsion system that can vary largely in a short time. Consequently, this variation shifts the optimum operating points of the diesel engines that leads to increase the overall emissions and operational costs. Moreover, power fluctuations caused by the dynamic loads such as propulsion motors along with the lack of cold-ironing facilities at both ends of seaports make it even worse. Therefore, the application of energy storage systems (ESSs) with proper coordination is becoming very popular for ships to improve the energy management, and thus decreases the fuel consumption. The aim of this paper is to firstly highlights different architectures of SMGs and the benefits the ESS can brings into them, then proposes an enhanced hierarchical control-based energy management scheme that is suitable for SMGs operations during an islanded and grid-connected operation. The proposed method based on the ESSs supports the diesel generators to enable them to operate in the optimum window recommended by the diesel engines company, which significantly decreases fuel consumption, operational costs, and emissions. Furthermore, to provide a linkage between SMG and the grid during port stays, conventional P −f and Q−V droop control strategy is adopted to import and export power to the seaport load or the grid for emergency purposes referred to in this study as Ship-to-X operation. The enhanced hierarchical control is capable of optimally shifting the modes for efficient and reliable operation and reducing specific fuel consumption. The performance of the proposed scheme is adopted and validated with satisfactory results of a practical hybrid SMG in a MATLAB/SIMULINK environment.