A g-C3N4 three-dimensional aggregate composed of hollow bubbles was developed by hydrothermally treating a supramolecular precursor in the presence of a soft template, Pluronic P-123, followed by annealing the obtained intermediate. While, it is found that, without the addition of P123, the obtained g-C3N4 sample consists of sheets. It has been observed that, during the annealing of the intermediate, long balloons were first formed and then transformed into hollow bubbles. And at the P123 mass fraction of 3 wt%, the obtained aggregate is mainly composed of broken hollow bubbles. It has been shown that the three-dimensional hollow bubbles, which was obtained from the intermediate prepared with 2 wt% P123, exhibits large specific surface area and pore volume, enhanced visible-light absorption region, reduced charge recombination, and increased photocurrent response. Consequently, this g-C3N4 material can degrade tetracycline by 97.9% in 12 min under visible light irradiation, which photocatalytic activity is superior to that of all the reported photocatalysts for degradation of tetracycline. It has been elucidated that, •O2− is the main active species, and •OH has been also generated in the reaction system. This work sheds light on the construction of g-C3N4 three-dimensional porous structures with high photocatalytic activity.