In northwest China, the limited amount of water resources are classified mostly as brackish water. Nanofiltration is a widely applied desalination technology used for brackish water treatment; however, membrane fouling restricts its application. Herein, we modified the membrane with triethanolamine (TEOA) and optimized the operating conditions (transmembrane pressure, temperature, and crossflow velocity) to control the nanofiltration membrane fouling by brackish water. Based on the physiochemical characteristics and desalination performance of the prepared membranes, the membrane modified with 2% TEOA (MPCM2) was identified as the optimal membrane, and 0.5 MPa, 25 °C, and 7 cm/s were identified as the optimal operating conditions through a series of nanofiltration experiments. Moreover, the membrane cleaning procedure for fouled MPCM2 was further determined, and a two-step cleaning procedure using ethylene diamine tetraacetic acid disodium followed by HCl with a permeance recovery rate of 98.77% was identified as the optimal cleaning procedure. Furthermore, the characterizations of the fouled and cleaned MPCM2 showed that the optimized cleaning procedure could recover the properties of MPCM2 to near virgin. This study is of great significance for the long-term stable operation of nanofiltration processes in brackish water treatment to ensure the supply of healthy water in the water-deficient areas of northwest China.