Properties of ferroelectric films are highly influenced by inevitable defects, such as hydrogen impurity. This study is focused on theoretical and numerical studies to probe effects of hydrogen contamination on ferroelectric stability in PbTiO3 (PTO) films using the first-principles effective Hamiltonian. First-principles calculations are performed to determine the possible position, formation energy, and mobility of hydrogen impurity atom, and the calculated results are used as inputs to molecular dynamics (MD) simulations in a large system. The hydrogen atom is able to move along the polarization with small energy barriers. The energy difference between a hydrogen contaminated PTO and a pure PTO is considered as an energy penalty term induced by hydrogen contamination and has been added to the effective Hamiltonian. Then, the MD effective Hamiltonian with the energy penalty is employed in MD simulations to investigate the effects of hydrogen contamination on the ferroelectric responses of PTO films with various thicknesses and temperatures. The hysteresis loops are presented and analyzed for PTO films with various concentrations of hydrogen impurities and thicknesses. Hydrogen contamination reduces the remnant polarization, especially for thin films. As the concentration of hydrogen impurities increases, the critical thickness increases. By analyzing the vertical cross section snapshots, it has been found that the hydrogen impurity atoms near interfaces affect the polarization throughout the entire PTO films.