In this research, the hydrogen bonds Y···H-X (X = C, N; Y = N, O) of thymine and uracil have been theoretically studied. The results show that hydrogen bond leads to bond length elongation and stretches the frequency red-shift of N-H···Y. Meanwhile, the C-H···O bonds shorten and stretch the frequency blue-shift. They all belong to traditional hydrogen bonds. The intermolecular charge transfer caused by the intermolecular hyperconjugation s*(N–H) → n(Y) and intramolecular charge redistribution by intramolecular hyperconjugation σ(C-H) →σ*(C-N) play important roles in the formation of hydrogen bonds. According to thejudgment standards proposed by Bader and Popelier, these hydrogen bonds have typical electron density topological properties. Electrostatic surface potential (ESP) is a useful physicochemical property of a molecule that provides insights into inter- and intramolecular associations, as well as the prediction of likely sites of electrophilic and nucleophilic metabolic attack.