Introduction: Semiconductors have similar crystal structures and matched energy levels could form a coupled heterojunction at an interface between them which may allow response to visible light, achieving efficient decomposition of organic compounds.Methods: The Bi2O2CO3/BiOI (BOC/BOI) with 2D/2D p-n heterojunction was prepared by one-pot room-temperature strategy. The prepared materials were tested by various technologies, and the three-dimensional structure, light absorption properties, electrochemical properties and other information were obtained. Photocatalytic tests have also been carried out.Results and discussion: BOC/BOI heterojunction with oxygen vacancies showed much higher photocatalytic activity than pure BOC and BOI. For example, the preferred BOC/BOI-0.5 heterojunction of the degradation rate for Rhodamine B (RhB) is 97.6 % within 2 h, which is 15.8 and 2.2 times faster than that of BiOI and BOC. In addition, the removal rates of tetracycline, ciprofloxacin and bisphenol A by BOC/ BOI-0.5 were 92.4, 80.3 and 68.6%, respectively. The 2D/2D structures of BOC/BOI-0.5 with rich in oxygen vacancies combined p-n junction can effectively inhibit the photoinduced electron-hole pair recombination and increase the production of active free radicals. The O2- and h+ are the main reactants, giving the composite catalyst potential for degrading a variety of pollutants.