Hierarchical nano-/microstructured photocatalysts have drawn attention for enhanced photocatalytic performance. Deep eutectic solvents (DESs) have been used as a green sustainable media to act as both solvent and structure-inducing agent in the synthesis of hierarchical nanomaterials. In this work, the DESs-assisted synthesis of flower-structured BiOCl/BiVO4 (BOC/BVO) with g-C3 N4 (BOC/BVO/g-CN) ternary heterojunctions was achieved by using a simple wet-chemical method, providing good acidic and alkaline oxygen evolution reaction (OER) catalysts. BOC/BVO/g-CN-15 achieved an enhanced photocatalytic activity for OER with an overpotential of 570 mV in 1 m H2 SO4 and 220 mV in 1 m KOH electrolyte at a current density of 10 mA cm-2 with excellent stability and extraordinary durability of the catalyst. The ternary heterojunctions displayed extended lifetimes for photogenerated charges and enhanced the separation efficiency of photogenerated electron-hole pairs, which is helpful to enhance the photocatalytic OER. Furthermore, the photocatalytic performance of the ternary heterojunctions in aqueous solution was demonstrated through photocatalytic dye degradation of methyl orange (MO) as a model pollutant, resulting in 95 % degradation of 20 ppm of MO in 210 min under the irradiation of a 35 W Xe arc lamp. This work not only provides new insight into the design of catalysts by using green solvents but also into the design of highly efficient metal-free OER photocatalysts for applications in acidic and alkaline media.