The photocatalytic degradation of antibiotics requires a good separation efficiency of photogenerated electron-hole pairs and a wide visible light absorption range. Current studies have discussed the successful preparation of ferroferric oxide/graphite carbon nitride/reduced graphene oxide (Fe3O4/g-C3N4/rGO). The phase structure and morphology of Fe3O4/g-C3N4/rGO composites were characterized by XRD, HR-TEM, SEM and EDS. The obtained composites were used to degrade tetracycline hydrochloride to evaluate its photocatalytic activity. The effects of four variables on the degradation of tetracycline hydrochloride were analyzed by the response surface method and artificial intelligence (gradient regression tree, random forest, artificial neural network, etc.). The results showed that the graphite carbon nitride in the catalyst maintained its original structure and that the photocatalytic activity was significantly improved. The degradation rate of tetracycline hydrochloride was 86.7%. The artificial neural network combined with a genetic algorithm was the best model for predicting the degradation of tetracycline hydrochloride by nanocomposites. The degradation of tetracycline hydrochloride was in accordance with the pseudosecond-order kinetic model. The proposed photocatalytic mechanism study indicated that ∙O2− and ∙OH radicals are the foremost reactive species that have vital roles in the photodegradation process. This finding provides a theoretical reference for the photocatalytic degradation of antibiotics (or analogous pollutants) in wastewater.