A distance measuring device is provided. The distance measuring device includes: a distance sensing unit, for sensing a distance value of a target object; a drive unit, for driving the distance sensing unit to rotate according to a rotation angle; and a compensation unit, for providing a compensation value according to the rotation angle and obtaining an actual distance according to the compensation value and the distance value.