Outer membrane vesicles (OMVs) produced by Gram-negative bacteria have key roles in cell envelope homeostasis, secretion, interbacterial communication, and pathogenesis. The facultative intracellular pathogen Salmonella Typhimurium increases OMV production inside the acidic vacuoles of host cells by changing expression of its outer membrane proteins and modifying the composition of lipid A. However, the molecular mechanisms that translate pH changes into OMV production are not completely understood. Here, we show that the outer membrane protein PagC promotes OMV production through pH-dependent interactions between its extracellular loops and surrounding lipopolysaccharide (LPS). Structural comparisons and mutational studies indicate that a pH-responsive amino acid motif in PagC extracellular loops, containing PagC-specific histidine residues, is crucial for OMV formation. Molecular dynamics simulations suggest that protonation of histidine residues leads to changes in the structure and flexibility of PagC extracellular loops and their interactions with the surrounding LPS, altering membrane curvature. Consistent with that hypothesis, mimicking acidic pH by mutating those histidine residues to lysine increases OMV production. Thus, our findings reveal a mechanism for sensing and responding to environmental pH and for control of membrane dynamics by outer membrane proteins.