Polyacrylonitrile (PAN) is a popular polymer that can be made into membranes using various techniques, such as electrospinning and phase inversion. Electrospinning is a novel technique that produces nonwoven nanofiber-based membranes with highly tunable properties. In this research, electrospun PAN nanofiber membranes with various concentrations (10, 12, and 14% PAN/dimethylformamide (DMF)) were prepared and compared to PAN cast membranes prepared by the phase inversion technique. All of the prepared membranes were tested for oil removal in a cross-flow filtration system. A comparison between these membranes' surface morphology, topography, wettability, and porosity was presented and analyzed. The results showed that increasing the concentration of the PAN precursor solution increases surface roughness, hydrophilicity, and porosity and, consequently, enhances the membrane performance. However, the PAN cast membranes showed a lower water flux when the precursor solution concentration increased. In general, the electrospun PAN membranes performed better in terms of water flux and oil rejection than the cast PAN membranes. The electrospun 14% PAN/DMF membrane gave a water flux of 250 LMH and a rejection of 97% compared to the cast 14% PAN/DMF membrane, which showed a water flux of 117 LMH and 94% oil rejection. This is mainly because the nanofibrous membrane showed higher porosity, higher hydrophilicity, and higher surface roughness compared to the cast PAN membranes at the same polymer concentration. The porosity of the electrospun PAN membrane was 96%, while it was 58% for the cast 14% PAN/DMF membrane.