A block-localized wave function method, which in effect can switch off conventional conjugation and hyperconjugation effects, is employed to investigate the origin of the rotational barriers in formamide and its analogues. It is found that the resonance between the π electrons on the C=X double bond and the nitrogen lone pair significantly stabilizes the planar conformation in HCXNH2 (X = O, NH, CH2, S, and Se). The absolute resonance energy follows the order of formamide < thioformamide < selenoformamide, with predicted vertical resonance energies of -25.5, -35.7, and -37.6 kcal/mol, respectively. The computed vertical resonance energies for X = O, NH, and CH2 are -25.5, -22.5, and -19.1 kcal/mol, respectively, which follow the decreasing trend of electronegativity. Although the rotational barrier about the C-N bond in vinylamine (4.5 kcal/mol) is much smaller than that of formamide (15.7 kcal/mol), the resonance energy in vinylamine is of the same order as that of formamide (-19.1 versus -25.5 kcal/mol). Consequently, the rotational barrier in formamide cannot be simply regarded as a result of the carbonyl polarization as proposed in early studies. In fact, energy decomposition results reveal that resonance and σ-framework steric effects are equally important for the estimated difference in rotational barrier. Ab initio valence bond calculations are performed to investigate the electronic delocalization in formamide and its analogues. Examination of the electron density difference between the adiabatic (delocalized) and diabatic (localized) states revealed that the resonance in the planar formamide shifts electron density from nitrogen both to carbon and to oxygen, supporting the conventional resonance model. This is accompanied by the opposing migration of the σ charge density, making the integrated atomic charges smaller than that expected from pure π delocalization.