Herein we demonstrate a facile, reproducible, and template-free strategy to prepare g-C3N4–Fe3O4 nanocomposites by an in situ growth mechanism. The results indicate that monodisperse Fe3O4 nanoparticles with diameters as small as 8 nm are uniformly deposited on g-C3N4 sheets, and as a result, aggregation of the Fe3O4 nanoparticles is effectively prevented. The as-prepared g-C3N4–Fe3O4 nanocomposites exhibit significantly enhanced photocatalytic activity for the degradation of rhodamine B under visible-light irradiation. Interestingly, the g-C3N4–Fe3O4 nanocomposites showed good recyclability without loss of apparent photocatalytic activity even after six cycles, and more importantly, g-C3N4–Fe3O4 could be recovered magnetically. The high performance of the g-C3N4–Fe3O4 photocatalysts is due to a synergistic effect including the large surface-exposure area, high visible-light-absorption efficiency, and enhanced charge-separation properties. In addition, the superparamagnetic behavior of the as-prepared g-C3N4–Fe3O4 nanocomposites also makes them promising candidates for applications in the fields of lithium storage capacity and bionanotechnology.