Regulation of oxygen on the properties of moderately boron-doped diamond films are fully investigated. Results show that, with adding a small amount of oxygen (ratio of oxygen to carbon <5.0%), the crystal quality of diamond is improved, and a suppression effect of residual nitrogen is observed. With increasing ratio of O/C from 2.5% to 20.0%, the hole concentration is firstly increased then reduced. And this change of hole concentration is also explained. Moreover, the results of Hall effect measurement varied with temperatures from 300 to 825 K show that, with adding a small amount of oxygen, boron and oxygen complex structures (especially B3O and B4O) are formed and exhibit as shallow donor in diamond, which resulted increases of donor concentration. With further increases ratio of O/C, the inhibitory behaviors of oxygen on boron leads to a decrease of acceptor concentration (the optical emission spectroscopy has shown that I
BH
/I
H
γ
is decreased with ratio of O/C more than 10.0%). This work demonstrates that oxygen-doping induced increasement of the crystalline and surface quality could be restored by the co-doping with oxygen. The technique could achieve boron-doped diamond films with both high quality and acceptable hole concentration, which is applicable to electronic level of usage.