Oil/water separation has inspired much research interest because of the damages caused to our natural environment due to oily wastewater. As a leader of advanced separation materials, electrospun polymeric fibrous mats having the properties of special surface wettability, high specific surface area, and high porosity will be a good membrane material for the separation of oily wastewater. Herein, we first prepared pH-responsive polymer poly(dimethylsiloxane)-block-poly(4-vinylpyridine) (PDMS-b-P4VP) mat using electrospinning technology. The PDMS-b-P4VP fibrous mat with a thickness of around 250 μm exhibits good pH-switchable oil/water wettability and is able to effectively separate oil or water from layered oil/water mixtures by gravity driven through adjusting the pH value. Stemming from its porous structure and pH-switchable superwettability, the electrospun PDMS-b-P4VP fibrous mat achieved controllable separations with high fluxes of approximately 9000 L h–1 m–2 for oil (hexane) and 27 000 L h–1 m–2 for water. In addition, extended studies on the polymer/silica nanoparticulate (silica NP) composite fibrous mats show that the addition of an inorganic component improves the thermal stability, pH-switchable wettability, and separation performance of the fibrous mats (approximately 9000 L h–1 m–2 for hexane and 32 000 L h–1 m–2 for water). It can be concluded from the results that both polymer fibrous mats and silica-filled composite fibrous mats are good candidates for on-demand layered oil/water mixture separation.