Water pollution caused by dye wastewater is a potential threat to human health. Using photocatalysis technology to deal with dye wastewater has the advantages of strong purification and no secondary pollution, so it is greatly significant to look for new visible-light photocatalysts with high photocatalytic ability for dye wastewater degradation. Semiconductor photocatalyst silver phosphate (Ag3PO4) has high quantum efficiency and photocatalytic degradation activity. However, Ag3PO4 is prone to photoelectron corrosion and becomes unstable during photocatalysis, which severely limits its application in this field. In this study, a tubelike g-C3N4/Ag3PO4 heterojunction was constructed by the chemical precipitation method. An Ag3PO4 nanoparticle was loaded onto the surface of the tubelike g-C3N4, forming close contact. The photocatalytic activity of the photocatalyst was evaluated by the degradation of RhB under visible-light irradiation. The tubelike g-C3N4/Ag3PO4-5% heterojunction exhibited optimal photocatalytic performance. In an optimal process, the degradation rate of the RhB is 90% under visible-light irradiation for 40 min. The recycling experiment showed that there was no apparent decrease in the activity of tubelike g-C3N4/Ag3PO4-5% heterojunction after five consecutive runs. A possible Z-type mechanism is proposed to explain the high activity and stability of the heterojunction.