In this study, a novel mesoporous nanocomposite was fabricated in several steps. In this regard, SBA-15 was prepared by the hydrothermal method, next it was magnetized by in-situ preparation of Fe3O4 MNPs. After that, the as-prepared SBA-15/Fe3O4 functionalized with 3-minopropyltriethoxysilane (APTES) via post-synthesis approach. Then, the guanidinylated SBA-15/Fe3O4 was obtained by nucleophilic addition of APTES@SBA-15/Fe3O4 to cyanimide. The prepared nanocomposite exhibited excellent catalytic activity in the synthesis of dihydropyrano[2,3-c]pyrazole derivatives which can be related to its physicochemical features such as strong basic sites (presented in guanidine group), Lewis acid site (presented in Fe3O4), high porous structure, and high surface area. The characterization of the prepared mesoporous nanocomposite was well accomplished by different techniques such as FT-IR, EDX, FESEM, TEM, VSM, TGA, XRD and BET. Furthermore, the magnetic catalyst was reused at least six consequent runs without considerable reduction in its catalytic activity.