Based on the detailed study of a counter-rotating compressor in the laboratory, three-dimensional optimization had been carried out in multi-blade row surrounding by approximate function methods combining with genetic algorithm. The second rotor had been optimized by this method to improve the performance of counter-rotating compressor. Compared with the initial compressor the results show that: at design point, the efficiency of the optimized counter-rotating compressor is increased by 0.69%, the mass flow rate and pressure ratio remaines basically unchanged, however the surge margin is improved. The efficiency of the rotor downstream increases by 1.36%, its pressure ratio is almost invariant, at the same time the performance of the rotor upstream retain a higher level at design point. By further contrast the flow structure of the optimized and initial counter-rotating compressor, the optimization reduces the wake mixing losses at the middle and tip of the rotor downstream, but increases the wake mixing losses at the root, the optimization improves the flow structure of outlet guide vane as well.