In a sparse aperture imaging system, the piston error affects the co-phase of subapertures and reduces the imaging resolution. Based on the image quality evaluation function, the piston error correction can be converted into a class of optimization problems. In this paper, a metaheuristic algorithm is used to implement global search based on stochastic parallel gradient descent algorithm. A hybrid algorithm is obtained by combining the stochastic parallel gradient descent algorithm with the Gray Wolf algorithm. The hybrid algorithm is developed at the best three positions of the population (the head wolf) using the gradient direction of the SPGD algorithm, and the other populations keep moving toward the best three head wolves. This hybrid algorithm balances exploration and exploitation better in the piston error correction of sparse aperture systems. The hybrid algorithm has a good optimization speed while satisfying the correction accuracy. The performance of this hybrid algorithm is verified in simulations with three-aperture and seven-aperture systems.