The relationship between electronic spectral shifts and hydrogen-bonding dynamics in electronically excited states of the hydrogen-bonded complex is put forward. Hydrogen bond strengthening will induce a redshift of the corresponding electronic spectra, while hydrogen bond weakening will cause a blueshift. Time-dependent density function theory (TDDFT) was used to study the excitation energies in both singlet and triplet electronically excited states of Benzonitrile (BN), 4-aminobenzonitrile (ABN), and 4-dimethylaminobenzonitrile (DMABN) in methanol solvents. Only the intermolecular hydrogen bond C≡N...H-O was involved in our system. A fairly accurate forecast of the hydrogen bond changes in lowlying electronically excited states were presented in light of a very thorough consideration of their related electronic spectra. The deduction we used to depict the trend of the hydrogen bond changes in excited states could help others understand hydrogen-bonding dynamics more effectively.