This paper proposes an approach for optimal placement and sizing of battery energy storage system (BESS) to reduce the power losses in the distribution grid. A meta-heuristic optimization algorithm known as Whale Optimization Algorithm (WOA) is introduced to perform the optimization. In this paper, two different approaches are presented to achieve the optimal allocation of the BESS. The first approach is to obtain the optimal location and sizing in two steps while the second approach optimizes both location and sizing simultaneously. The performance of the proposed technique has been validated by comparing with two other algorithms namely firefly algorithm and particle swarm optimization. The results show that WOA has outstanding performance in attaining the optimal location and sizing of BESS in the distribution network for power losses reduction.