Conventional two-dimensional (2D) graphitic carbon nitride, 2D g-C3N4 with its layered structures and flat and smooth 2D surface possesses certain disadvantages that is affecting their photocatalytic performances. In this paper, new nanostructured spine-like three-dimensional (3D) g-C3N4 nanostructures are created for the first time via a new three-step synthesis method. In this method, self-assembly of layered precursors and H+ intercalation introduced by acid treatment play an important role for the unique nanostructure formation of 3D g-C3N4 nanostructures. The spine-like 3D g-C3N4 nanostructures show a superior photocatalytic performance for H2 generation, achieving 4500 μmol·g−1·h−1, 8.2 times higher than that on conventional 2D g-C3N4. Remarkably spine-like 3D g-C3N4 nanostructures demonstrate a clear photocatalytic activity toward CO2 reduction to CH4 (0.71 μmol·g−1·h−1) in contrast to the negligible photocatalytic performance of conventional 2D g-C3N4 for the reaction. Adding Pt clusters as co-catalysts substantially enhance the CH4 generation rate of the 3D g-C3N4 nanostructures by 4 times (2.7 μmol·g−1·h−1). Spine-like 3D g-C3N4 caged nanostructure leads to the significantly increased active sites and negatively shifted conduction band position in comparison with conventional 2D g-C3N4, favorable for the photocatalytic reduction reaction. This study demonstrates a new platform for the development of efficient photocatalysts based on nanostructured 3D g-C3N4 for H2 generation and conversion of CO2 to useful fuels such as CH4.