Deformation measurement of a cantilever based on digital holographic interferometry is presented. The digital holograms of the cantilever before and after deformation are obtained by use of phase-shifting technique. By using the phase-shifting digital holography, the object wave information without zeroth order diffraction wave can be extracted. The phase difference of the reconstructed cantilever before and after deformation is obtained numerically using discrete Fresnel diffraction integral. Owing to the numerical analysis, the deformation of the cantilever can be obtained with high resolution of nanometer dimensions. The optical experimental results are shown to confirm our proposed method. Furthermore, we propose a mechanical movement free double-exposure method in phase-shifting digital holography using a laser diode.