Designing effective heterojunction photocatalysts with facile synthesis and low cost exists challenges and is demand for antibiotics degradation under visible illumination. Here, we focus on an advanced nanocomposite based on a mesoporous TiO2 framework accommodated with Co3O4 NPs with variation Co3O4 percentages through soft template and impregnation procedure. The obtained heterojunction Co3O4/TiO2 nanocomposites possess a mesoporous structure with high large surface area (184 m2 g−1). The obtained heterojunction Co3O4/TiO2 photocatalyst was examined for the photooxidation of ciprofloxacin (CIP) under visible exposure. The optimal 1.5% Co3O4/TiO2 nanocomposite revealed the highest degradation performance ∼100% within 60 min. The 1.5% Co3O4/TiO2 photocatalyst indicated the highest apparent rate constant (0.0157 min−1), about 13 times larger than pristineTiO2 (0.0012 min−1). The synthesized Co3O4/TiO2 photocatalyst exhibited superb photodegradation efficiency and excellent stability (five cycles) without loss in photocatalytic ability. The construction of S-scheme Co3O4/TiO2 p–n heterojunction with synergistic effect can boost migration of photoinduced carriers and build the close interface, thereby producing more active oxidative species for photodegradation of CIP. This work provides the construction and design of S-scheme heterojunction photocatalysts for practical applications under visible light.