An efficient solid-phase approach to prepare substituted 1,4,5,6-tetrahydro-6-oxopyridines bearing a carboxylic acid group on C3 has been developed. The four-step protocol involves an initial acetoacetylation of polystyrene Wang resin, followed by preparation of resin-bound enamine. The cyclization reactions were carried out by reacting immobilized enamines with Knovenagel derivatives by a Hantzsch-type heterocyclization. Acidolytic cleavage from the solid support rendered the desired heterocyclic compounds in excellent yields and high purity. The synthesized compounds were structurally characterized by spectroscopic methods. In order to gain a better understanding of the structure of the obtained heterocycles, theoretical calculations at the ab initio (B3LYP/6-31G*) level were performed.