Creating oxygen vacancy in tungsten trioxide (WO3) has been considered as an effective strategy to improve the photocatalytic performance for degrading organic pollutants. In this study, oxygen vacancies were introduced into WO3 by thermal treatment under Ar atmosphere and their proportion was changed by setting different treatment times. WO3-x samples show better photoelectric properties and photocatalytic degradation performance for carbamazepine (CBZ) than an oxygen-vacancy-free sample, and WO3-x with the optimal proportion of oxygen vacancies is obtained by thermal treatment for 3 h in 550 °C. Furthermore, it discovers that the surface oxygen vacancies on WO3-x would be recovered when it is exposed to air, resulting in a bulk oxygen vacancy dominating WO3-x (bulk-WO3-x). The bulk-WO3-x exhibited much higher degradation efficiency for CBZ than WO3-x with both surface and bulk oxygen vacancies. The mechanism study shows bulk-WO3-x mainly degrades the CBZ by producing OH radicals and superoxide radicals, while oxygen-vacancy-free sample mainly oxidizes the CBZ by the photoexcited hole, which requires the CBZ to be adsorbed on the surface for degradation. The radical generated by bulk-WO3-x exhibits stronger oxidizing capacity by migrating to the solution for CBZ degradation. In summary, the influence of oxygen vacancy on photocatalytic degradation performance depends on both the proportion and location distribution and could lie in the optimization of the photodegradation mechanism. The results of this study could potentially broaden our understanding of the role of oxygen vacancies and provide optimal directions and methods for oxygen vacancy regulation for photocatalysts.