Five- and six-membered heteroaromatic nitrogen compounds play an inhibiting role in the hydrodesulfurization of diesel oil. In this work, the ionic liquids (ILs) are used as green solvents to remove such compounds by liquid liquid extraction (LLE). Approximately 168 ILs comprising cations which include 1-ethyl-3-methylimidaozlium [EMIM], 1-ethylpyridinium [EPY], 1-ethyl-1-methyl pyrrolidinium [EPYRO], 1-ethyl-1-methylpiperidinium [EMPIP], 4-ethyl-4-methyl morpholinium [EMMOR], and 1,2,4-trimethylpyrazolium[TMPYZO] combined with 26 anions were investigated in this work. The infinite dilution activity coefficient (IDAC) was predicted through the conductor-like screening model for real solvents (COSMO-RS) model in order to screen the potential solvents. Initially the model was benchmarked via IDAC and LLE predictions. LLE was predicted for four reported ternary systems in which a nitrogen heterocycle was one of the compounds. The average root-mean-square deviation (rmsd) obtained was 10%. The IDAC values were predicted for pyridine in two ionic liquids, namely [BMIM][BF4] and [EMIM][TOS], with a root-mean-square (rms) error of 8%. Thereafter the selectivity, capacity, and performance index at infinite dilution were calculated to evaluate the performance. It was found that the five-membered nitrogen species having high delocalized electron density possessed 3 orders of magnitude higher selectivity than the six-membered nitrogen species. For the fivemembered ring structures, the selectivity was found to follow the order [EPYRO] > [EMPIP] > [EPY] > [EMMOR] > [EMIM] > [TMPYZO]. For the six-membered heterocycle, it followed the order [EPY] > [EMMOR] > [EPYRO] > [EMPIP] > [EMIM] > [TMPYZO]. Irrespective of nitrogen heterocycle, anions such as thiocyanate [SCN] and acetate [Ac] gave high values of selectivity. In general cations without aromatic rings such as [EPYRO], [EMPIP], and [EMMOR] gave higher selectivity and capacity irrespective of the nitrogen heterocycle.