In an attempt to prepare a low-cost and efficient acidic heterogeneous catalyst for the conversion of fructose to 5-hydroxymethylfurfural under mild reaction conditions, the acidity of halloysite was improved by covalent grafting of an acidic polyionic liquid. More precisely, halloysite was first vinyl functionalized and then polymerized with vinyl imidazole and 2-acrylamido-2-methylpropanesulfonic acid. The tangling imidazole rings were further converted to acidic ionic liquids by treating them with chlorosulfuric acid. UV–Vis spectroscopy and Hammett equation confirmed that conjugation of acid polyionic liquid resulted in the increase of the acidity of halloysite. Investigation of the efficiency of the catalyst for the synthesis of 5-hydroxymethylfurfural and optimization of reaction variables showed that 5-hydroxymethylfurfural was yielded in 97.8% after 30 min under the optimum conditions, i.e. catalyst loading of 20 wt% at 70 °C. Notably, the catalyst was highly reusable and it could be reused for at least seven reaction runs with insignificant loss of its activity. Furthermore, this catalyst could also promote the conversion of sucrose and maltose to give moderate yields of 5-hydroxymethylfurfural.