Among the traditional treatment processes for purifying wastewater contaminated with Rhodamine B (RhB), semiconductor photocatalysis is the most effective technology because it can oxidize organic pollutants and convert them into CO2, H2O, and other harmless molecules in a safe and efficient manner. According to literature research, it is feasible to enhance the performance of g‐C3 N4 as a photocatalyst by constructing a heterojunction with other photocatalytic materials. Morphological regulation of carbon nitride (g‐C3N4) is a viable strategy for improving its photocatalytic activities. By controlling the morphology of g‐C3N4, factors such as light absorption, specific surface area, charge separation, and reaction sites can be optimized to enhance its photocatalytic efficiency. Three‐dimensional tremella‐like carbon nitride (3DT‐CN) and 3D‐CN/TiO2/HNTs (halloysite nanotubes) were prepared using bubble templates and an impregnation method respectively. The Z‐scheme heterojunction structure constructed by 3D‐CN and TiO2 promotes electron‐hole separation. Catalytic experiments demonstrated that under irradiation for 120 min, the 3D‐CN/TiO2/HNTs catalyst could eliminate 86.48 % of Rhodamine B (RhB). Additionally, active radicals such as e‐, h+, ⋅OH, and ⋅O2‐ are involved in RhB degradation. Therefore, the three‐dimensional tremella‐like 3D‐CN/TiO2/HNTs heterojunction photocatalyst has great potential for environmental purification.