In this research, an air gap membrane distillation (AGMD) pilot was used for the tertiary treatment of effluent from Bandar Abbas oil refinery’ s wastewater treatment unit. The commercial type membranes used in this system were with two different pore sizes 0. 22 and 0. 45µ m, made of PTFE material with PP support. The cold flow was kept constant at 20 ° C, and the effect of some process factors on the amount of produced water flux such as feed temperature (hot flow), air gap, concentration of wastewater, and membrane pore size were studied as Feed temperatures were equal to 40, 50, 60, 70 and 80 ° C, air gaps were equal to 6 and 12 mm, feed concentrations were equal to 780, 2100, 3250, 4400 and 5200 μ s/cm. Also, the reduction of the amount of flux due to probable membrane fouling was investigated. Maximum produced flux was 16. 44 kg/(m2. h) which was obtained using a 0. 45 micron membrane, 6 mm air gap, and feed temperature of 80 ° C. Increasing the air gap from 6 to 12 mm decreased the flux about 34%, while reducing the electrical conductivity from 4400 to 780 μ s/cm, the amount of flux showed only 28% growth. Also, after about 30 hours of using the membrane without any cleaning system, the flux reduction was observed about 12%. Finally, according to the analysis of final purified water by membrane distillation method, the amount of TDS maximum 7. 8 mg/L, COD about 4 mg/L, and chloride less than 8 mg/L have been obtained; in addition, it has well been illustrated that the effluent of Bandar Abbas refinery’ s wastewater plant by using membrane distillation supplementation can be used at all different sections of industry.