Graphitic carbon nitride (g-C3N4) is a promising material for photocatalytic applications. However, it suffers from poor visible-light absorption and a high recombination rate of photogenerated electron–hole pairs. Here, Co/La@g-C3N4 with enhanced photocatalytic activity was prepared by co-doping Co and La into g-C3N4 via a facile one-pot synthesis. Co/La@g-C3N4 displayed better performance, achieving 94% tetracycline (TC) removal within 40 min, as compared with g-C3N4 (BCN, 65%). It also demonstrated promising performance in degrading other pollutants, which was ~2–4-fold greater relative to BCN. The improved photocatalytic activity of Co/La@g-C3N4 was associated with improved photogenerated charge separation, reduced charge transfer resistance, a built-in electric field arising from the p-n-p heterojunction, and the synergistic effect of ternary components for the separation and transfer of the photogenerated charge carriers. Superoxide radicals are suggested to be the most notable reactive species responsible for the photocatalytic reaction. Environmental factors, including the pollutant concentration, catalyst dosage, solution pH, inorganic salts, water matrices, and mixture with dyes, were considered in the photocatalytic reactions. Co/La@g-C3N4 showed good reusability for five cycles of the photocatalytic degradation of TC. The facile one-pot co-doping of Co and La in g-C3N4 formed a p-n-p heterojunction with boosted photocatalytic activity for the highly efficient removal of TC from various water matrices.