A facile and efficient synthesis of substituted dihydropyridin-2(3H)-ones is developed from penta-2,4-dienamides, in which an intramolecular C-N bond was formed through thermal 6π-azaelectrocyclization. The intramolecular hydrogen bonding-assisted cyclization reaction opens access to a variety of dihydropyridin-2(3H)-ones.