A facile and efficient direct synthesis of N-substituted 4H-pyrido[1,2-a]pyrimidin-4-imines is developed from α-acyl-β-(2-aminopyridinyl)acrylamides mediated by triflic anhydride (Tf2O) in the presence of 2-chloropyridine. This amide activation protocol features mild reaction conditions, simple execution, excellent yields, and high chemoselectivity, and is also applied to the synthesis of substituted 4H-pyrido[1,2-a]pyrimidin-4-ones via a practical one-pot procedure.