In this work, 1,2,3,4,5,8-hexahydro-1,3,7-trimethyl-2,4-dioxopyrido[2,3-d]pyrimidine-6-carboxamide derivatives were synthesized in a simple and efficient method from the four-component condensation reaction of diketene, an aliphatic or aromatic amine, an aromatic aldehyde, and 6-amino-1,3-dimethyluracil in the presence of a catalytic amount of p-toluenesulfonic acid under mild conditions at ambient temperature in high yields.