This paper presents an efficient fuzzy logic control system for charging and discharging of the battery energy storage system in microgrid applications. Energy storage system can store energy during the off-peak hour and supply energy during peak hours in order to maintain the energy balance between the storage and microgrid. However, the integration of battery storage system with microgrid requires a flexible control of charging-discharging technique due to the variable load conditions. Therefore, a comparative evaluation of the developed model is analyzed by considering controllers with fuzzy only and optimized fuzzy algorithms. In this paper, backtracking search algorithm based fuzzy optimization is introduced to evaluate the state of charge of the battery by optimizing the input and output fuzzy membership functions of rate of change of the state of charge and power balance. Backtracking search algorithm is chosen due to its high convergence speed, and it is good for searching and exploration process with exploiting capabilities. To validate the performance of the developed controller, the obtained results are compared to the results obtained with the particle swarm optimization based fuzzy and fuzzy only controllers, respectively. Results show that the backtracking search algorithm based fuzzy optimization outperforms the other control methods in terms of effectively manage the charging-discharging of the battery storage to ensure the desired outcome and reliable microgrid operation. INDEX TERMS Fuzzy controller, state of charge, battery energy storage, optimization, chargingdischarging, microgrid, load.