We describe here a novel footprinting technique to probe the in vivo structural dynamics of membrane protein. This method utilized in situ generation of hydroxyl radicals to oxidize and covalently modify biomolecules on living Escherichia coli cell surface. After enriching and purifying the membrane proteome, the modified amino acid residues of the protein were identified with tandem mass spectrometry to map the solvent-accessible surface of the protein that will form the footprint of in vivo structure of the protein. Of about 100 outer membrane proteins identified, we investigated the structure details of a typical beta-barrel structure, the porin OmpF. We found that six modified tryptic peptides of OmpF were reproducibly detected with 19 amino acids modified under the physiological condition. The modified amino acid residues were widely distributed in the external loop area, beta-strands, and periplasmic turning area, and all of them were validated as solvent-accessible according to the crystallography data. We further extended this method to study the dynamics of the voltage gating of OmpF in vivo using mimic changes of physiological circumstance either by pH or by ionic strength. Our data showed the voltage gating of porin OmpF in vivo for the first time and supported the proposed mechanism that the local electrostatic field changes in the eyelet region may alter the porin channels to switch. Thus, this novel method can be a potentially efficient method to study the structural dynamics of the membrane proteins of a living cell.