For measuring the surface profile of many micro-optical components which are made of non-conductive material, such as diffractive grating and Fresnel lens, with complicated shapes on their surfaces, the electrostatic force microscopy (EFM) was recommended in noncontact condition. When a bias voltage is applied between the conducting probe tip and a back electrode where a non-conducting sample was put on, an electrostatic force will be generated between the probe tip and the sample surface. The electrostatic force will change with the distance between the probe tip and the sample surface. Firstly, the relationship between the electrostatic force and the tip-sample distance was analyzed based on the dielectric polarization theory. The theoretical result shows that the electrostatic force is proportional to 1/d2, where d is the distance between the probe tip and sample surface. Then, a numerical method (finite element method -FEM) was employed to calculate the electrostatic force and the result shows accordance with the theoretical method. Finally, the prototype of a scanning electrostatic force microscopy was built which is composed of a conducting probe unit with a Z scanner driven by piezoelectric actuators, a XY scanner unit for mounting the sample and back electrode and a circuit unit for detecting the frequency shift. The force curve, which shows the relationship between the electrostatic force and the tip-sample distance, was achieved by using the EFM prototype. All results demonstrated that it is feasible for using the EFM system to measure the surface profile of non-conductor.