In this paper the importance of correcting a small centre-of-rotation displacement (approximately 1 mm) in single-photon-emission computed tomography (SPECT) using high-resolution pinhole collimation is demonstrated. A filtered backprojection (FBP) algorithm is derived for a pinhole geometry that has a displaced centre-of-rotation. The centre-of-rotation displacement, or mechanical shift (MS), is the displacement of the midplane of the pinhole collimator from the rotation centre. It is characterized by two orthogonal components: the shift eta of the midplane of the pinhole collimator along the direction of the axis of rotation, and the distance tau between the midline of the pinhole collimator and the axis of rotation. This algorithm is fast and corrects the centre-of-rotation displacement directly by incorporating this displacement into the algorithm. This new algorithm is evaluated using both a three-line source and a micro-SPECT cold rod phantom. The results demonstrate that the pinhole FBP with mechanical shift correction is able to correct the 'doughnut'-type artifacts caused by the mechanical shift and restore the expected system resolution.