Supported ionic liquids onto solid catalysts are among the most popular catalysts in chemical reactions with several unique advantages. However, the harsh reaction conditions, long reaction times, low product yields, and tedious work-up, are still the challenges for its application. A novel polystyrene-modifed dicationic ion liquid [PS-(Im)2-SO3H] was synthesized through the reaction of chloromethyl polystyrene with imidazole, 1,4-dichlorobutane and 1,3-propanesultone. Its structure was characterized and confrmed using Fourier Transform Infrared spectroscopy (FT-IR), Thermogravimetric analysis (TGA), X-ray diffraction (XRD), Dynamic Light Scattering (DLS), Scanning Electron Micrograph (SEM), Energy Dispersive Spectroscopy (EDS), and Elemental analyses. This polymer-supported dicationic ion liquid was used as an acidic heterogeneous catalyst for the synthesis of xanthene derivatives through condensation of aldehydes, dimedone, and β-naphthol. The products were obtained in high yields (88–97 %) at room temperature and short reaction time in ethanol as a green solvent. The reaction mixture was easily fltered to isolate the heterogeneous catalyst, which could be reused for at least eight cycles without any signifcant activity loss.