A conventional SPECT image of lung is obtained by accumulating the detected count of gamma rays over long acquisition time that contains many respiratory cycles. The lung motion due to respiration during the acquisition makes reconstructed image blurred and may lead to a misdiagnosis. If a respiratory-gated SPECT is used, reconstructed images at various phase of respiration are obtained and the blur in an image can be avoided. However, the respiratory-gated SPECT requires long time to accumulate sufficient number of counts at each phase. If the acquisition time is not long enough, the detected count becomes inadequately small and hence the reconstructed image becomes noisy. We propose a method for correcting the motion between different phase images obtained with the respiratory-gated SPECT. In this method, an objective function consisting of both the degree of similarity between a reference and a deformed image and the smoothness of deformation is defined and optimized. The expansion ratio defined as a ratio of the change of the local volume due to the deformation is introduced to preserve the total activity during the motion correction process. By summing each phase images corrected by this method, a less noisy and less blurred SPECT image can be obtained. Furthermore, this method allows us to analyze the local movement of lung. This method was applied to the computer phantom, the real phantom and some clinical data and the motion correction and visualization of local movements between inspiration and expiration phase images were successfully achieved.