The reaction of a multi-substituted pyrazole 1 with aryl or heteroaryl aldehydes and active methylene compounds afford unexpected pyrazolo[1,5-a]pyridine derivatives 4(a-k). Mechanism for this unexpected reaction involving reactivity of the active methylene moiety with a neighboring endocyclic NH group is proposed and structure has been established by the NMR and single crystal X-ray diffraction studies. Moreover, all the newly synthesized compounds were tested for their anticancer activity against sixty human cell lines at NCI. Among all the compounds, three scaffolds 4d, 4 h and 4k showed enhancement in anticancer activity in comparison with remaining synthesized compounds. Interestingly compound 4k was found to highly active even at a five dose concentration. The IC 50 values were determined against two cell lines MCF-7 and HepG2, the results obtained have shown promising effects against cancer cell lines. Further, the molecular docking studies revealed that substituted pyrazolo[1,5-a]pyridine derivatives are good candidates in the medicinal field.