Oxygen vacancies (OVs) have been reported to significantly alter the photocatalytic properties of BiOCl nanosheets. However, their formation mechanism and their role in the enhancement of photoelectrochemical performance remain unclear. In this work, thermally induced oxygen vacancies are introduced in BiOCl nanosheets by annealing in He atmosphere at various temperatures and their formation mechanism is investigated by in-situ diffuse reflectance infrared (DRIFTS) measurements. The influence of OVs on band offset, carrier concentrations and photoelectrochemical performance are systematically studied. The results show that (1) the surface of BiOCl nanosheets is extremely sensitive to temperature and defects are formed at temperatures as low as 200 °C in inert atmosphere. (2) The formation of bulk OVs in BiOCl is identified by a combination of XPS and EPR experiments. (3) The photocurrent of BiOCl is limited by the concentration of charge carriers and shallow defect states induced by bulk oxygen vacancies, while the modulation of these parameters can effectively increase light absorption and carrier concentration leading to an enhancement of photoelectrochemical performance of BiOCl.