In a typical phase-shifting profilometry system for the three-dimensional (3D) shape measurement, shadows often exist in the captured images as the camera and projector probe the object from different directions. The shadow areas do not reflect the fringe patterns which will cause errors in the measurement results. This paper proposed a new method to remove the shadow areas from taking part in the 3D measurement. With the system calibrated and the object reconstructed, the 3D results are mapped on a point-by-point basis into the corresponding positions on the digital micro-mirror device (DMD) of the projector. A set of roles are presented to detect the shadow points based on their mapped positions on the DMD plane. Experimental results are presented to verify the effectiveness of the proposed method.