Microgrids (MGs) are Low Voltage distribution networks comprising various distributed generators (DG), storage devices and controllable loads that can operate either interconnected or isolated from the main distribution grid as a controlled entity. Energy storage system (ESS) is a vital part of an MG. In this paper, a methodology is proposed for the optimal allocation and economic analysis of ESS in MGs on the basis of net present value (NPV). As the optimal operation of an MG strongly depends on the arrangement and allocation of its ESS, economic operation strategies and optimal allocation methods of the ESS devices are required for the MG. Self-adaptive Bee Swarm Optimization (SBSO) algorithm is applied to optimize the operation strategies and capacities of ESS in MGs in order to find maximal NPV, the generation schedule of ESS and distributed generation sources. This paper is to suggest, among those available ESS, the optimal sizes and types of them and their optimal arrangement, such that the total NPV achieved during the system operational lifetime period is maximized. After introducing the methodology, a case study is presented for illustration.