Optimized condition for desalination of the reverse osmosis (RO) rejected stream from Esfahan Oil Refining Company (EORC) using direct contact membrane distillation (DCMD) with polytetrafluoroethylene (PTFE) membrane was investigated here, having designed a set of 34 experiments using response surface methodology (RSM) and full factorial design (FFD) modelling, carried out in a laboratory scale set-up built for this purpose. Statistical criteria for validation, significance, accuracy and adequacy confirmed the suitability of the quadratic polynomial model employed. Response plots and regression equations suggested that the permeate flux response improved with increased feed temperature, reduced permeate temperature and enhanced feed flow rate. Optimizing DCMD process showed that maximum permeate flux of 60.76 L/m2·h could be achieved at the following optimum operational conditions: feed temperature and flow rate of 70 °C and 2 L/min, respectively, as well as the permeate temperature of 15 °C. At this point, the mean annual energy required for 90% water recovery (36 m3/h off the RO brackish rejected stream) at EORC refinery was found to be 96GJ, which could be supplied using solar or conventional energy systems at Isfahan, facing a very critical water shortage at present.