The discharge of industrial oily wastewater and oil spill accidents has resulted in significant environmental pollution, creating an urgent need for the treatment of oily wastewater. Nanofiber membranes, known for their high stability, flux, and efficiency, are widely employed in oil–water separation. This study systematically compared the performance of polyacrylonitrile/ graphene oxide (PAN/GO) composite nanofiber membranes prepared through immersion and electrospinning methods for oily wastewater treatment. Experimental findings demonstrated that immersion-prepared membranes achieved high flux (772.9 ± 2.9 L·m−2·h−1, n-hexane/water mixture) and efficiency (98.8%) at a GO concentration of 1.0 g/mL. On the other hand, electrospinning-prepared membranes exhibited superior flux (1500.3 ± 4.4 L·m−2·h−1, n-hexane/water mixture) and efficiency (99.6%) at a higher GO concentration (1.5 g/mL). This membrane displayed excellent stability, maintaining their exceptional performance even after ten cycles of separation. This study compared the advantages and disadvantages of the two methods for preparation of PAN/GO composite nanofiber membrane, offering valuable guidance for practical applications.