In order to increase the reliability and service life of piston in a heavy-duty diesel engine, the geometric structure of piston was optimized based on its maximum temperature and maximum coupling stress. To begin with, the boundary conditions of thermal and stress fields are calculated, which include the heat produced by the combustion in cylinder, the friction-induced heat, and the heat transferred to cooling system. Then, the finite element model was established to calculate and analyse the temperature and thermal-mechanical coupling stress fields of the piston. By combining this simulation model with orthogonal experimental design methods, computations and analyses were performed to determine how the five geometric parameters (depth of intake and exhaust valve grooves, radius of valve grooves transition, radius of top of valve grooves, height of first piston ring groove, and depth of piston ring groove) influence the two evaluation indicators (maximum temperature and maximum stress of piston). Subsequently, using the proposed ABC-OED- FE (artificial bee colony, orthogonal experiment design, and fitting equations) method, the fitting equations between the geometric parameters and evaluation indicators were determined. Taking the minimum values of two evaluation indicators of piston as optimization objectives, artificial bee colony method was run to determine the values of parameters. At last, the two evaluation indicators of the optimized piston were computed. The results indicate that, after optimization, the maximum temperature of piston decreases to be 16.05 K and the maximum stress decreases to be 13.54 MPa. Both temperature and stress conditions of the optimized piston had been improved, which demonstrates the effectiveness of the optimization and the validity of the algorithm.