Using temperature modulation, two distinct hydrogen bond organic frameworks HOF-C and HOF-K with different pore sizes were synthesized from the same ligands, tris(4-(4H-1,2,4-triazole-4-yl)phenyl)amine. The pore size difference prevents TRZ from entering HOF-K, while allowing TRZ to selectively insert into the larger-pored HOF-C to form HOF-C-TRZ. The donor-acceptor (D-A) structure formed in HOF-C-TRZ enhances its photoelectric response and exhibits exceptional uranium reduction under visible light irradiation. This study provides an effective strategy for pore size regulation of HOFs and opens up new ideas for the development of advanced uranium photocatalysts.