Nanoscale control of oxygen nonstoichiometry in oxide thin films has become more and more important as the characteristic sizes of oxide devices have been reduced to the nanometer scale. We propose a new in situ electrochemical approach for nanoscale characterization of oxygen stoichiometry in epitaxial oxide thin films. For this purpose, we have developed a pulsed laser deposition system equipped with an electrochemical analysis cell. In situ characterization of homoepitaxial TiO2 thin films by a combination of reflection high-energy electron diffraction and Mott-Schottky analysis has revealed that the lattice oxygen in the TiO2 film subsurface region up to a depth of about 10 nm can be easily lost or gained, depending on temperature and the ambient oxygen pressure. This unavoidably results in a nanoscale inhomogeneous distribution of oxygen vacancies in TiO2 films.