With the development of smart grid construction, a large number of distributed power access to distribution network. In recent years, the concept of life-cycle cost has been incorporated into the power system. This paper compares the improved firefly algorithm with the basic algorithm on a typical test functions and analyzes advantages of an improved analysis algorithm. Meanwhile, based on the firefly algorithm combined with the improved and full life-cycle theory, presenting a new model of substation locating and sizing and several groups of programs were compared to verify the effectiveness and superiority of new model at the time of optimal solution. In the last example, taking into account access to distributed power distribution system, we meet the conclusions of distributed power substation can save construction costs, make better capacity configuration.