In this work, 4H-pyran derivatives were synthesized via a green one-pot three-component reaction of aldehyde, malononitrile and a beta-ketoester in the presence of copper ferrite magnetic nanoparticles at room temperature in ethanol via an environmentally friendly, simple and economical procedure.