A microlens array was realized on a diamond by combining thermal reflow with dry etch technique for Shack-Hartmann sensor. Firstly, photoresist pillars were developed on a diamond surface by standard photolithography. Then, the diamond substrate was placed on a hotplate and the photoresist pillars were reflowed to form spherical segment patterns. Finally, inductively coupled plasma etch technique was used to transfer these patterns onto a diamond, thereby forming a diamond microlens array. The fabricated diamond microlens array exhibits spherical profiles of microlenses with diameters of 90 μm, focal lengths of 0.839 mm, as well as good uniformity and surface smoothness. Furthermore, the diamond microlens array was combined with an image sensor to form a Shack-Hartmann sensor. The self-built Shack-Hartmann sensor was used to detect spherical wavefront in an optical measurement, which has potentiality to work under harsh conditions such as the outer space and high energy irradiation.