Compared with traditional mirrors, a membrane mirror made of flexible film material has the advantages of folding and deployable, lightweight, low cost and etc, and it is prospected to be used as large aperture space optical elements. In order to solve the problem of measuring the shape of the membrane mirror, a method based on the Shack-Hartmann wavefront sensing has been studied in this paper. The Shack-Hartmann wavefront sensing system and the principle of wavefront detection are introduced firstly. In this system, the measured wavefront is collected by the microlens of the lenslets and focus on the CCD, the light spot coordinate offsets relative to the ideal spots are got and then the wavefront can be reconstructed. Secondly, according to the optical properties of a membrane mirror, the membrane mirror wavefront detection system has been designed and established. The preprocessing of the light spot image of the testing wavefront focused by the microlens array, the determination of the centroid coordination and the algorithm of wavefront reconstruction modal based on Zernike polynomials are researched and a program for reconstructing the wavefront is written with in Matlab. When measuring, in order to eliminate the influence of other optical components in the detection system on the testing wavefront, a standard plane mirror is used to calibrate the system. A glass planar mirror made of glass with a diameter of 50mm and a known distribution of surface shape is used to verify the feasibility of the test system and the correction of the algorithm. Finally, the wavefront of a membrane mirror with a diameter of 85mm is measured and the errors are analyzed. It provides a means of measuring the shape of membrane mirror.