The effect of salts on the 5‐hydroxymethylfurfural (HMF) synthesis over the catalyst of AlCl3‐HCl was investigated. An unprecedented R (distribution coefficient) value of 30.48 was achieved in the H2O/THF system when MgSO4 was used as a salting‐out agent. Results indicated that the excellent salting‐out effect of MgSO4 on HMF was attributed to the synergistic effect of Mg2+ and SO42−. MgSO4 showed more efficiency on the HMF synthesis than other salts in the ChCl‐H2O/THF biphasic system. A 78.1% yield of HMF was achieved from glucose under optimal conditions, and higher than 95.0% of the produced HMF was partitioned into the organic phase due to the excellent salting‐out effect of MgSO4. During the recyclability of the aqueous phase, a remarkably high yield of HMF (78.0%) and conversion of glucose (93.8%) were achieved even after 10 cycles. The MgSO4 also showed efficiency to improve the synthesis of HMF from other sugars. Finally, the salting‐out effect of MgSO4 on sugar dehydration was investigated in other biphasic systems, and the yield of HMF showed an obvious increase compared with the literature reports.