The increased penetration of renewable energy sources has prompted the integration of battery energy storage systems in active distribution networks. The energy storage systems not only participate in the backup power supply but also have the potential to provide various distributed ancillary services. In this paper, a new bi-level optimization framework is developed to optimally allocate the intense wind power generation units and battery energy storage systems with the provision of central and distributed ancillary services in distribution systems. Two battery energy storage systems and one shunt capacitor are strategically allocated for coordination of wind power generation. One of the battery is deployed at grid substation to participate in central ancillary services whereas second is participating in distributed ancillary services. At level-1, all the distributed energy resources are optimally allocated while minimizing the annual energy loss of distribution systems. Whereas, level-2 performs hourly optimal energy and ancillary services management of distributed resources deployed at level-1. The objectives considered at level-2 are the minimization of hourly load deviation, reverse power flow towards the grid, power loss, and node voltage deviation. The proposed framework is implemented on a real-life Indian 108-bus distribution system for different cases and solved by using a genetic algorithm. The comparison of simulation results reveal the promising advantages of the proposed optimization framework. It provides more energy loss and demands deviation reduction, improved system voltage and power factor at higher wind penetration as compared to the cases in which distributed ancillary services are ignored in the planning stage.