In a standard Shack-Hartmann wavefront sensor, the number of effective lenslets is the vital parameter that limits the wavefront restoration accuracy. This paper proposes a wavefront reconstruction algorithm for a Shack-Hartmann wavefront sensor with an insufficient microlens based on an extreme learning machine. The neural network model is used to fit the nonlinear corresponding relationship between the centroid displacement and the Zernike model coefficients under a sparse microlens. Experiments with a 6×6 lenslet array show that the root mean square (RMS) relative error of the proposed method is only 4.36% of the initial value, which is 80.72% lower than the standard modal algorithm.