In recent years, metal–organic framework (MOF)-based nanofibrous membranes (NFMs) have received extensive attention in the application of water treatment. Hence, it is of great significance to realize a simple and efficient preparation strategy of MOF-based porous NFMs. Herein, we developed a direct in situ formation of MOF/polymer NFMs using an electrospinning method. The porous MOF/polymer NFMs were constructed by interconnecting mesopores in electrospun composite nanofibers using poly(vinylpolypyrrolidone) (PVP) as the sacrificial pore-forming agent. MOF (MIL-88A) particles were formed inside the polyacrylonitrile (PAN)/PVP nanofibers in situ during electrospinning, and the porous MIL-88A/PAN (pMIL-88A/PAN) NFM was obtained after removing PVP by ethanol and water washing. The MOF particles were uniformly distributed throughout the pMIL-88A/PAN NFM, showing a good porous micro-nano morphological structure of the NFM with a surface area of 143.21 m2 g−1, which is conducive to its efficient application in dye adsorption and removal. Specifically, the dye removal efficiencies of the pMIL-88A/PAN NFM for amaranth red, rhodamine B, and acid blue were as high as 99.2, 94.4, and 99.8%, respectively. In addition, the NFM still showed over 80% dye removal efficiencies after five adsorption cycles. The pMIL-88A/PAN NFM also presented high adsorption capacities, fast adsorption kinetics, and high cycling stabilities during the processes of dye adsorption and removal. Overall, this work demonstrates that the in situ electrospun porous MOF/polymer NFMs present promising application potential in water treatment for organic dyestuff removal.