The paper presents a new bi-level optimisation framework for optimal accommodation and operational management of wind power generation and battery energy storage system (BESS) simultaneously, aiming to maximise the renewable hosting capacity of distribution networks. A new objective function is suggested comprising of annual energy loss in feeders, reverse power flow into the grid, non-utilised BESS capacities, round-trip conversion losses of BESSs and node voltage deviation subjected to various system security constraints. An artificial-intelligence-based optimal management of BESS is proposed for effective control of high-renewable power generation. Due to the high investment and running costs of BESS, minimum storage capacity has been ensured in planning stage. In order to show the effectiveness of the proposed model, it is implemented on a benchmark test distribution system of 33-bus. Besides, various test cases are investigated and compared, which shows that the proposed optimisation model is promising.