A novel Brønsted acidic nanocomposite, H3PMo11O39@SiO2@g-C3N4 has easily prepared. This nanocomposite has characterized and identified using a Fourier transform infrared spectroscopy (FT-IR), X-ray powder diffraction (XRD), field emission scanning electron microscopy (FE-SEM) and energy-dispersive X-ray spectroscopy (EDX). Three-component condensation reaction of aldehyde, malononitrile, and dimedone carried out in the presence of the H3PMo11O39@SiO2@g-C3N4 nanocomposite as a green catalyst under solvent-free conditions at room temperature. The experimental results show that the 4-hydropyran derivatives obtained in high yields and very short reaction times. Easy workup, reusability, and stability of the green catalyst are noteworthy advantages of this method. Moreover, this heterogeneous catalyst can be satisfactorily recovered by simple filtration and reused at least five times without loss of activity.