This article proposes a fuzzy logic-based energy-management system (FEMS) for a grid-connected microgrid with renewable energy sources (RESs) and energy storage system (ESS). The objectives of the FEMS are reducing the average peak load (APL) and operating cost through arbitrage operation of the ESS. These objectives are achieved by controlling the charge and discharge rate of the ESS based on the state of charge of ESS, the power difference between load and RES, and electricity market price. The effectiveness of the fuzzy logic greatly depends on the membership functions (MFs). The fuzzy MFs of the FEMS are optimized offline using a Pareto-based multiobjective evolutionary algorithm, nondominated sorting genetic algorithm (NSGA-II). The best compromise solution is selected as the final solution and implemented in the fuzzy-logic controller. A comparison with other control strategies with similar objectives is carried out at a simulation level. The proposed FEMS is experimentally validated on a real microgrid in the energy storage test bed at Newcastle University, U.K.