Mineral scaling and scaling-induced wetting are major challenges for the widespread application of membrane distillation (MD) in saline wastewater treatment. For the first time, an in-line modified activated alumina (AA) granular filtration coupled with MD process was proposed to achieve effective control of gypsum scaling. Firstly, the AA modified by NaOH impregnation with tuned pore structure and surface characteristics were supplied as the filter media. The optimized MD performance was obtained using in-line filtration with modified AA (MAA) with 20 g/L NaOH and the ratio of AA and NaOH solution of 1:3 for the duration of 24 h. Compared with severe scaling without granular filter, the optimized performance with a final normalized flux higher than 0.7 and a permeate conductivity less than 5 μS/cm at 70 % water recovery was observed. The MAA with rich pore, scale-like structures and high Na loading showed a superior ability in capturing gypsum scaling due to the enhanced heterogeneous scaling and the retention of scaling. In-line granular filtration-MD was also effective in mitigating gypsum scaling and scaling-induced wetting in saline solutions (e.g., 7–12 g/L NaCl). Our findings provide guidance for surface design of granular filter media and scaling control in membrane desalination technology.