The analysis of the influence of hull deformation on shaft alignment is predominately conducted using the finite element method (FEM), which is time-consuming, labor-intensive, and challenging to use for iterative hull design optimization. In this paper, hull deformation is separated into two parts—global deformation and local deformation, simplified to a single-span beam model and a grillage beam model, respectively—then solved using the matrix displacement method (MDM). Compared to FEM, the proposed method has a small calculation error, proving its correctness, while the calculation time is greatly reduced. The proposed method has been used to calculate the hull deformation of a ship under various conditions and evaluate its influence on shaft alignment. The results indicate that under certain conditions, the bearing reaction forces are constant, whereas the bearing pressure changes as a consequence of the change in shaft-to-bearing angle. The comparison between local rotation and shaft-to-bearing angle reveals that bearings in various positions follow distinct laws. We suggest that the shaft-to-bearing angle be used as an additional parameter in the evaluation of shaft alignment calculations. Moreover, when optimizing bearing pressure, bearings in different positions are affected differently by global and local deformation, and their optimization priorities are distinct.