Residual antibiotics in natural aquatic environments pose a critical threat to humans and other organisms. However, most sewage treatment plants fail to remove them. Photocatalytic nanomaterials can efficiently destroy these persistent organic pollutants in wastewater. In this study, we developed a series of cobalt-doped SrTiO3 (Co-STO) catalysts with different doping amounts (3, 5, 7, and 9 wt%) for the effective photocatalytic degradation of ciprofloxacin (CIP). The nanostructures were characterized using X-ray diffraction, field-emission scanning electron microscopy with energy dispersive X-ray analysis, transmission electron microscopy, X-ray photoelectron spectroscopy, UV-visible diffuse reflectance spectroscopy, and Brunauer–Emmett–Teller N2 adsorption isotherms. The Co-STO particles have a mesoporous diameter of ~30.8 nm, and the Co-doped nanostructures have a rhombohedral hopper-like shape. Co-doping decreased the bandgap of pure STO from 3.61 to 3.42 eV, which enabled it to absorb visible light. Among the catalysts, 7 wt% Co-STO showed the highest CIP degradation activity (90.6%) during 120 min of visible-light irradiation. Radical scavenging experiments revealed that superoxide (O2 •-) is the primary reactive species during degradation. These Co-doped nanostructures have potential applications in the remediation of hazardous pollutants in pharmaceutical wastewater. Moreover, the crystal and energy band structure, density of states, and Bader charge of these molecules were analyzed.