The invention discloses a device for detecting an in-plane error in a micro/nano device out-of-plane motion test and a compensating method. The device has a control and image processing unit and a phase shift micro interfering system which is connected with the control and image processing unit, wherein the phase shift micro interfering system comprises a vibration isolating table, a three-dimensional micro motion probe table, a tested micro/nano device, a micro interferometer, a nano positioning instrument and a microscope, which are arranged in turn, and a flash lighting controller, a high-pressure amplifier driver, an arbitrary waveform generator, a charged coupled device (CCD) camera, and an image acquisition card; the input end of the arbitrary waveform generator is connected with the control and image processing unit, and the output end of the arbitrary waveform generator is connected with the flash lighting controller and the high-pressure amplifier driver; the CCD camera is connected with a microscope; and the image acquisition card is connected with the control and image processing unit and the CCD camera respectively. The method comprises: acquiring the motion image of the tested micro/nano device; testing in-plane displacement; testing out-of-plane motion; and performing two-phase unwrapping of a time axis and a spatial axis. The invention is easy to use with high reliability.