The optimal allocation problem of distributed generation(DG) under multiple load levels in a distribution network is investigated. A new bilevel programming model that considers DG participating in energy-saving dispatching is proposed. The upper level aims at maximizing the operation value of DG by determining the site and size of DG and energy storage; the lower level determines DG output by simulating optimal energy-saving dispatch in the distribution network including energy storage. A hybrid algorithm that combines the ant colony algorithm with linear programming to solve this model is constructed. In order to reduce the computation time, a parallel algorithm is implemented. Simulation results show that the DG capacity and operation value is greatly enhanced by using the proposed model. Moreover, the calculating speed and searching efficiency can be improved with the parallel algorithm.