Abstract A new approach was proposed for the preparation of metal–organic framework/metal oxide composites in one step using only metal salts. Here, crystalline rhombohedral dodecahedron ZIF-8, hollow ZnO microsphere, and ZIF-8/ZnO composites were obtained in different one-pot solvothermal processes where the growth toward individual ZIF-8 and ZnO phases and toward ZIF-8/ZnO composites was controlled by adjusting the ratio of metal salts to 2-methylimidazole. Subsequently, a series of derived (C and/or N)-doped ZnO nanoparticles was obtained by a two-step calcination process. The absorption kinetics and photocatalytic activity in methyl orange degradation under visible light were investigated. ZIF-8-derived ZnO could maintain their original morphology and displayed excellent photocatalytic activity 10 times higher than that of the original ZIF-8.