In order to make the system design meet the requirements of practical ghost imaging, the impact of mechanical vibration on the ghost imaging is analyzed. In ghost imaging system, the light field modulated by a digital micromirror device (DMD) is used to illuminate the target and the transmission or scattering light is detected by a single pixel detector. The target is reconstructed by combining the results of the detector and the intensity distribution of light field, so the modulation matrices of light field play a vital role in ghost imaging. By considering the form of imaging system to vibration and taking the modulation transfer function as an evaluation function, this paper quantitatively analyzes the impacts of various forms of mechanical vibration on the intensity distribution of light field. Combining engineering practice, several solutions are proposed to reduce the impact of vibration on the imaging quality. The results of simulation and experiment indicated that the analysis is correct and usable.