This research has been focused on a study of sulfolane and four ionic liquids as solvents in liquid–liquid extraction. Liquid–liquid equilibria data were obtained for mixtures of (sulfolane or 4-methyl-N-butylpyridinium tetrafluoroborate ([mebupy]BF4) or 1-ethyl-3-methylimidazolium ethylsulfate ([emim]C2H5SO4) or 1,3-dimethylimidazolium methylsulfate ([mmim]CH3SO4) or 1-butyl-3-methylimidazolium methylsulfate ([bmim]CH3SO4)) + toluene + n-heptane at T = 313.2 and 348.2 K and p = 0.1 MPa. The experimental data for the binary and ternary systems were well correlated with the NRTL model. The toluene/heptane selectivity values were higher with all four ionic liquids tested than with sulfolane, which is one of the most common solvents for extraction of aromatic hydrocarbons from mixtures of aromatic and aliphatic hydrocarbons used in industry. The ionic liquid [mebupy]BF4 showed an optimal combination of a high toluene distribution coefficient and a high toluene/n-heptane selectivity. These values were for the range of toluene concentrations below 55 mol% at 313.2 K and below 45 mol% at 348.2 K higher than those with sulfolane. The ionic liquid [mebupy]BF4 is, therefore, a suitable solvent to replace sulfolane for an industrial extraction process for the separation of aromatic and aliphatic hydrocarbons.