In order to further improve the ecological environment in desert areas and actively respond to the development of the “dual carbon” policy, numerous distributed photovoltaics have been connected to the distribution network in recent years. Network loss caused a greater impact. For the location and capacity planning of distributed photovoltaic access to the distribution network, this paper proposes a distributed photovoltaic location and capacity model that considers investment costs, distribution network losses, voltage stability, and environmental protection costs. The improved multi-objective genetic algorithm is used to solve the optimization model, which is verified by example simulation. After the optimized configuration, the power supply quality and network loss of the distribution network are significantly improved, which verifies the feasibility of the model. This research provides a certain reference and reference for the location and capacity determination of the distribution network with distributed photovoltaics.