Tetracycline (TC) is a drug commonly detected in wastewater. Given this, researchers have been working intensely to create efficient methods to eliminate TC from water. Therefore, the work aimed to synthesize a metal-free catalyst, graphitic carbon nitride (g-CN), to remove TC from water through photocatalysis. The one-step methodology via thermal condensation successfully synthesized the catalyst. Also, a Box-Behnken experimental design was used in the TC treatment to optimize variables such as pollutant and catalyst concentration and pH. Under optimized conditions, there was a 79% removal in 2 h. Furthermore, the catalyst was reused in four consecutive cycles, demonstrating remarkable recyclability. Therefore, the catalyst produced proved effective and promising for the aqueous remediation of TC.