In situ generation of reagents and their subsequent use downstream presents new opportunities to amplify the utility of nanofluidic devices by exploiting the confined geometry to address mass transport limitations on reaction kinetics and efficiency. Oxygen, an inherently valuable reactant, can be produced from electrolysis of water, a process that can be conveniently integrated within a nanofluidic system. Here, we construct and characterize a nanofluidic device consisting of a planar microband electrode embedded within a nanochannel for in situ electrochemical generation and optical monitoring of O2. Fluorescein, a dye with a pH-sensitive emission intensity, was used to monitor the spatiotemporal characteristics of the oxidation of H2O, using the co-produced H+. Application of anodic potentials at the nanochannel-embedded electrode results in a decrease in fluorescence intensity, which reflects the decreasing solution pH. A combination of fluorescence intensity and chronoamperometric response was used to quantitatively determine proton generation, and the H+/O2 stoichiometry was then used to determine the concentration of the O2 in the channel. Comparison of the experimental results to finite element simulations validates the use of fluorescein emission intensity to spectroscopically determine the local oxygen concentration in the nanochannel. By varying the applied potential, spatially averaged O2 concentrations ranging from 0.13 to 0.41 mM were generated. The results demonstrate a convenient route to in situ modulation of the dissolved O2 level in a nanofluidic device and the use of an optical probe to monitor its spatial and temporal distribution under flow conditions.