The utilization of covalent triazine frameworks (CTFs) as photocatalysts has witnessed rapid advancements in the field of photocatalysis. However, the presence of residual components in certain CTFs materials is widely ignored as regards their influence on photocatalytic performance. In this study, we find that trifluorosulfonic acid (TfOH) molecules stably exist in the amino-functionalized CTF-NH2 framework, which enhance the affinity for water. The experimental results indicate that the residual TfOH elevates the VB position of CTF-NH2, facilitating the oxidization of both water and sacrificial agents. Moreover, the present of TfOH accelerates the separation and transfer of photogenerated charge carriers to the Pt cocatalyst. Consequently, CTF-NH2-F containing residual TfOH molecules demonstrates a significant enhancement in the photocatalytic hydrogen evolution, achieving about 250 µmol over a duration of 3 h of illumination, which represents a 2.5-fold increase compared to that observed for CTF-NH2. This research underscores the substantial impact that residues exert on photocatalytic performance.