Large complex forgings, as the main load-bearing components in the fields of energy, ships, transportation, etc., have high requirements for dimensional accuracy and surface quality of post-processing. Realizing automatic grinding of large and complex forgings is a common problem that the forging industry urgently needs to solve. One of the main technical obstacles is that large and complex forgings have significant thermal deformation and various random forging defects, resulting in difficulty of automatically generating grinding paths. Firstly, a random defect identification algorithm for large and complex forgings is proposed. By combining the random sample consensus (RANSAC) algorithm with the modified iterative closest point (M-ICP) algorithm, the point cloud from the standard part and that from the forging part are registered to obtain the random defect point cloud referring to the forging defects to be polished; Next, based on the dimension of the defect area, the random defect point cloud is classified and a grinding path generation strategy was established; Then, using the position coordinate information in the random defect point cloud, the robot grinding path is directly generated without the need for a CAD model; Finally, robot grinding experiments are conducted on large and complex forgings. The experimental results showe that the intelligent generation method of grinding paths accurately identified the characteristics of random forging defects, correctly planned the robot grinding path, improved grinding efficiency and quality, and provided a technical method for the post-processing of large complex forgings. © 2024 Chinese Mechanical Engineering Society. All rights reserved.