Molecular dynamics simulations were performed to study combinations of [AcO]−, [TfO]−, [BF4]−, and [PF6]− anions paired with imidazolium cations of increasing alkyl chain length to elucidate the roles of anions and cations in solvating ibuprofen. Our simulation results revealed that ionic liquids (ILs) with strong ibuprofen solvation capacity should possess strong van der Waals force from cations and strong hydrogen bond (HB) from anions. Accordingly, it was found that ILs containing anions with strong HB acceptability, such as [AcO]− anion, were the best effective solvent for ibuprofen solvation, while the longer alkyl chain in the imidazolium cations decrease the polarity, thus increasing the affinity with ibuprofen. Therefore, it was suggested that the heterocyclic structure of imidazolium cation with moderate polarity and longer alkyl chain is a promising cation candidate, whereas the anions which have a strong HB acceptability and substituents without electron withdrawing groups are beneficial. The obtained results can provide useful information for rational design and selection of new ILs to dissolve insoluble drugs.