The present survey focuses on the elaboration of magnetic nanocomposites by the in-situ incorporation of magnetite (Fe 3 O 4 ) nanoparticles (NPs) with spherical and nano ower-like) morphologies in graphitic carbon nitride (g-C 3 N 4 ) sheets using two different synthetic routes. Nanomaterials are characterized by TEM, SEM, XRD, FTIR, BET, zetametry, vibrating sample magnetometry, and UV-vis absorption spectroscopy. The decoration of the carbon nitride matrix with the magnetic NPs enhanced optical and textural properties. The in uence of the shape of the magnetic NPs on the adsorptive and photocatalytic properties of the nanocomposites under different pH conditions was assessed from batch tests to remove methylene blue (MB) from aqueous solutions. In extreme pH conditions, the nanocomposites exhibited lower or equivalent MB removal capacity compared to the pure g-C 3 N 4 . However, at neutral medium, the nanocomposite with incorporated Fe 3 O 4 nano owers showed a signi cantly higher removal e ciency due to the combination of a high adsorption capacity and a good photocatalytic activity in this pH region. The proposed nanocomposite is a promising alternative to remove cationic dyes from water by magnetic assistance, since no pH adjustment of the polluted e uent is required, reducing costs and environmental impact in the dyeing industry.