In order to further improve the effectiveness of design(inverse) issue of S2 surface of axial compressor, a design method of optimization model based on real-coded genetic algorithm is instructed, with a detailed description of some important points such as the population setting, the fitness function design and the implementation of genetic operator. The method mainly takes the pressure ratio, the circulation as the optimization variables, the total pressure ratio and the overall efficiency of the compressor as the constraint condition and the decreasing of the diffusion factor of the compressor as the optimization target. In addition, for the propose of controlling the peak value of some local data after the optimization, a local optimization strategy is proposed to make the method achieve better results. In the optimization, the streamline curvature method is used to perform the iterative calculation of the aerodynamic parameters of the S2 flow surface, and the polynomial fitting method is used to optimize the dimensionality of the variables. The optimization result of a type of ten-stage axial compressor shows that the pressure ratio and circulation parameters have significant effect on the diffusion factor's distribution, especially for the rotor pressure ratio. Through the optimization, the smoothness of the mass-average pressure ratio distribution curve of the rotors at all stages of the compressor is improved. The maximum diffusion factors in spanwise of rotor rows at the first, fifth and tenth stage of the compressor are reduced by 1.46%, 12.53% and 8.67%, respectively. Excluding the two calculation points at the root and tip of the blade because of the peak value, the average diffusion factors in spanwise are reduced by 1.28%, 3.46%, and 1.50%, respectively. For the two main constraints, the changes of the total pressure ratio and overall efficiency are less than 0.03% and 0.032%, respectively. In the end, a 3-d CFD numerical result is given to testify the effects of the optimization, which shows that the loss in the compressor is decreased by the optimization algorithm.