In this work, magnetic poly(aniline-co-melamine) nanocomposite as an efficient heterogeneous polymer-based nanocatalyst was fabricated in two steps. First, poly(aniline-co-melamine) was synthesized through the chemical oxidation by ammonium persulfate, then the magnetic nanocatalyst was successfully prepared from the in-situ coprecipitation method in the presence of poly(aniline-co-melamine). The resulting poly(aniline-co-melamine)@MnFe2O4 was characterized by FTIR, FESEM, XRD, VSM, EDX, TGA, and UV-vis analyses. The catalytic activity of poly(aniline-co-melamine)@MnFe2O4 was investigated in the synthesis of 4,4'-(arylmethylene)bis(1H-pyrazole-5-ol) derivatives, and new alkylene bridging bis 4,4'-(arylmethylene)bis(1H-pyrazole-5-ol) derivatives in excellent yields. The yield of 1,4-dihydropyrano[2,3-c]pyrazoles, 4,4'-(arylmethylene)bis(1H-pyrazol-5-ol), yields, and new alkylene bridging bis 4,4'-(arylmethylene)bis(1H-pyrazol-5-ol) derivatives were obtained 89%-96%, 90%-96%, and 92%-96%, respectively. The poly(aniline-co-melamine)@MnFe2O4 nanocatalyst can be recycled without pre-activation and reloaded up to five consecutive runs without a significant decrease in its efficiency. In addition, the antioxidant activity of some derivatives was evaluated by DPPH assay. Results showed that the maximum antioxidant activity of 4,4'-(arylmethylene)bis(1H-pyrazole-5-ol) derivatives and 1,4-dihydropyrano[2,3-c]pyrazoles were 75% and 90%, respectively. Furthermore, 4,4'-(arylmethylene)bis(1H-pyrazole-5-ol) derivatives and 1,4-dihydropyrano[2,3-c]pyrazoles showed good potential for destroying colon cancer cell lines. Consequently, the poly(aniline-co-melamine)@MnFe2O4 nanocomposite is an excellent catalyst for green chemical processes owing to its high catalytic activity, stability, and reusability.