A series of Co3O4@C-N (N = 1, 2, 3) composite photocatalysts were prepared by simple agitation and pyrolysis for degradation of organic dyes. The hollow macroscopic spherical structure of Co3O4@C-2 was constructed by adjusting the pyrolysis time. Compared with pure Co3O4, the carbon composite Co3O4@C-2 significantly enhanced light absorption in the UV and visible range, improved the electron transport efficiency and prevented the necessary photoexcited electron-hole pair recombination. Hence, the photocatalytic degradation rate of methylene blue (MB, 20 mg/L) reached 100% in 120 min under UV–vis light irradiation. Under the coupling of Co3O4 and graphitized carbon, Co3O4@C-2 obtained high structural stability, good reusability and low biotoxicity. Scavenging experiments and ESR test showed that •O2- radical was the active species for MB removal. After six cycles of tests, the photocatalytic efficiency of Co3O4@C-2 remained at 90.42%. The macroscopic spherical structure Co3O4@C-2 effectively avoids the problem of dispersion and recovery of powder catalyst, which also paves a path for the designing of candidate commercial photocatalyst with high efficiency and low consumption.