In this paper, the bilevel programming model of the public transport network considering factors such as the per capita occupancy area and travel cost of different groups was established, to alleviate the urban transportation equity and optimize the urban public transport network under fairness constraints. The upper layer minimized the travel cost deprivation coefficient and the road area Gini coefficient as the objective function, to solve the optimization scheme of public transport network considering fairness constraints; the lower layer was a stochastic equilibrium traffic assignment model of multimode and multiuser, used to describe the complex selection behavior of different groups for different traffic modes in the bus optimization scheme given by the upper layer. The model in addition utilised the noninferior sorting genetic algorithm II to validate the model via a simple network. The results showed that (1) the travel cost deprivation coefficient of the three groups declined from 33.42 to 26.51, with a decrease of 20.68%; the Gini coefficient of the road area declined from 0.248 to 0.030, with a decrease of 87.76%; it could be seen that the transportation equity feeling of low-income groups and objective resource allocation improved significantly; (2) before the optimization of public transport network, the sharing rate of cars, buses, and bicycles was 42%, 47%, and 11%, respectively; after the optimization, the sharing rate of each mode was 7%, 82%, and 11%, respectively. Some of the high and middle income users who owned the car were transferred to the public transportation. It could be seen that the overall travel time of the optimized public transport network reduced, enhancing the attraction of the public transport network to various travel groups. The model improves the fairness of the urban public transport system effectively while ensuring the travel demand of the residents. It provides theoretical basis and model foundation for the optimization of public transit network, and it is a new attempt to improve the fairness of the traffic planning scheme.