Oil and gas wastewater refers to the waste stream produced in special production activities such as drilling and fracturing. This kind of wastewater has the following characteristics: high salinity, high chromaticity, toxic and harmful substances, poor biodegradability, and a difficulty to treat. Interestingly, nanomaterials show great potential in water treatment technology because of their small size, large surface area, and high surface energy. When nanotechnology is combined with membrane treatment materials, nanofiber membranes with a controllable pore size and high porosity can be prepared, which provides more possibilities for oil–water separation. In this review, the important applications of nanomaterials in wastewater treatment, including membrane separation technology and photocatalysis technology, are summarized. Membrane separation technology is mainly manifested in ultrafiltration (UF), nanofiltration (NF), and reverse osmosis (RO). It also focuses on the application of semiconductor photocatalysis technology induced by TiO2 in the degradation of oil and gas wastewater. Finally, the development trends of nanomaterials in oil and gas wastewater treatment are prospected.