A novel three-dimensional (3D) S-scheme S-gC3N4/TiO2/SiO2/PAN aerogel heterojunction photocatalyst (denoted as S-gTAHP) is rationally devised and manufactured by combining electrospinning, calcination, hydrothermal and freeze-drying techniques. The synthesized S-gC3N4 molecule is different from traditional g-C3N4, which has a small molecular structure similar to melamine. S-gC3N4 is embedded in the interwoven network structure of TiO2/PAN short fibers, and the catalytic system of the S-scheme heterojunction is formed with SiO2 as a crosslinking agent. S-gTAHP achieves perfect tri-functional photocatalytic capability, including remarkable hydrogen release capacity (806.7 μmol∙h−1∙g−1), efficient removal of three colored dyes with removal efficiencies up to 99.43% (MB, 15 min), 96.13% (RhB, 30 min) and 91.32% (MO, 40 min), and a degradation rate of the colorless antibiotic TCH reaching 84.20% in 40 min driven by simulated sunlight. Meanwhile, the effects of pH values and concentrations of contaminant solutions on the removal rates are explored, and the S-scheme mechanism of S-gTAHP strengthening photocatalytic activity is elucidated. The apparently heightened photocatalytic activities of S-gTAHP can be ascribed to the fact that the 3D hierarchical porous structure of the aerogel endows more active centers and enhanced light-harvesting capacity, and the S-scheme heterojunction supplies effective charge migrating channels, thereby affording the carriers with strong redox capability. Furthermore, S-gTAHP holds prominent reusability and is light weight. Hence, efficient and recyclable 3D aerogel photocatalysts with S-scheme heterojunctions have broad application prospects in practical sewage treatment and energy conversion fields.