5‐Carboxanilide‐dihydropyrimidinone derivatives were synthesized in good yield in a three‐component and efficient process by the condensation reaction of acetoacetanilide, aldehyde and urea/thiourea in the presence of cobalt(II) nitrate hexahydrate as catalyst in ethanol at ambient condition.