The utilization of distributed photovoltaic (PV) generation and electricity storage battery is the most important method to reach the goal of carbon peaking and carbon neutrality by transforming the energy structure in China. Compared with the popularization of centralized PV grid-connected plant, the household distributed PV system is in the transition period from starting to commercialization. This paper, by considering the residents living in a community and developers who plan to invest in a PV generation/storage micro-grid system when constructing buildings for the community, establishes a two-layer mathematical model for the leader-follower game, in which the autonomous behavior pattern of stakeholders is the core. In the outer layer, the developer needs to decide the capacity size and selling price of the micro-grid system in order to maximize its profit. In the inner layer, the residents in the community need to decide whether they should agree with the construction of the micro-grid system by considering the difference between the electricity bill before the construction and that after joining the framework. In addition, the residents will not only change their power consumption behavior to maximize benefits, but also pay attention to the fairness when they use the micro-grid system. Through solving the model and analyzing the relationship between the two sides of the game, it can be seen that the developer and residents of all walks of life can benefit from the project considering the current market data only if the system configuration is designed well and coordinated with the weather conditions of better sunshine intensity. Some managerial insights can be obtained as follows. First, the households with a higher power consumption benefit more from the micro-grid system in different types of residents. Secondly, although the PV subsidies of the government can greatly increase the revenue of the system developer, it does not promote the increase of installed capacity, nor does it bring more benefits to the residents. Finally, the unified management of micro-grid can bring more benefits to both sides and encourage the developer to build larger installations compared with the independent operation mode, which shows the advantage of sharing facilities in the community.