Using real-time spectroscopic ellipsometry, we directly observed a reversible lattice and electronic structure evolution in SrCoO x (x = 2.5 − 3) epitaxial thin films. Drastically different electronic ground states, which are extremely susceptible to the oxygen content x, are found in the two topotactic phases, i.e. the brownmillerite SrCoO 2.5 and the perovskite SrCoO 3 . First principles calculations confirmed substantial differences in the electronic structure, including a metal-insulator transition, which originates from the modification in the Co valence states and crystallographic structures. More interestingly, the two phases can be reversibly controlled by changing the ambient pressure at greatly reduced temperatures. Our finding provides an important pathway to understanding the novel oxygencontent-dependent phase transition uniquely found in multivalent transition metal oxides.