One of the most widespread problems afflicting people throughout the world is adequate access to clean water. Problems with water are expected to grow worse in the coming decades, with water scarcity occurring globally, even in regions currently considered water-rich. Research on the effects of temperature, transmembrane pressure (TMP), and aeration rate on the quality of effluent is of great significance in the case of membrane bioreactor. By means of the box-Behnken design (BBD) response surface methodology experiments; for the experimental investigation, the three factors are selected for optimization like the temperature is optimized in the range of 27.6-37.4 °C, transmembrane pressure is 35-63 mm Hg, and aeration rate is optimized in the range of 75-90 L/min and regression models are established. The optimal control parameters of temperature, TMP, and aeration rate are found utilizing the BBD optimizer. The removal mechanism of pollutants is discussed, and GC-MS analysis of effluent of the MBR system is also reported. The results show that the aeration flow rate affected effluent quality more significantly compared to temperature and TMP. When the aeration flow rate is 90 L/min, the temperature is 37.4 °C, and TMP is 35 mm Hg, the obtained COD, BOD, TKN, and TP values achieve the standard quality governed by the Central Pollution Control Board (CPCB) of India.