The nanoindentation test is extensively used to obtain the mechanics performance of different kinds of materials. In this study, the general process in the lapping and polishing of Q235 steel samples for nanoindentation has been analyzed by considering the pressure (P), rotation speed of the lapping and polishing plate (rp), flow rate of abrasive slurry (Qa), and the processing time (t). It is found from the lapping experiments with a full factorial design that the optimized processing parameters are rp of 200 r/min, P of 30 N, and t of 4 min considered in this study by considering the material removal rate and subsurface damage. The central composite design method has been used to design the polishing experiments, and the support vector machine (SVM) method has been used to deal with these experimental results, and it is found that the developed SVM model can accurately predict the surface roughness under different processing parameters. Then, based on the SVM model, the genetic algorithm (GA) method is used to obtain the optimized processing parameters in the polishing process, and it is found from the SVM-GA study that the optimized processing parameters in the lapping process are rp of 108 r/min, P of 33 N, Qa of 20 ml/min, and t of 3 min. Finally, a set of nanoindentation tests have been conducted to evaluate the lapping and polishing performance, and it is found that the surface integrity has been significantly improved after the optimization of the lapping and polishing parameters by using the SVM-GA method considered in this study.