Crude coconut oil often contains high levels of polycyclic aromatic hydrocarbons (PAHs), which are commonly carcinogenic. The present work demonstrated that PAHs in coconut oil were significantly removed by ionic liquids (ILs). The relationship between the removal efficiency and the structures of ILs was investigated, using 12 different types ILs. Among these, 1‐butyl‐3‐methylimidazolium tosylate ([Bmim][TOS]) showed the highest efficiency in removing benzo(a)pyrene (BaP). The optimal process conditions for the removal of PAHs using [Bmim][TOS] were explored, and the removal efficiency for benzo(a)anthracene (BaA), chrysene (CHR), benzo(b)fluoranthene (BbF), and BaP under the optimal conditions were 42.7 ± 1.0, 33.3 ± 1.4, 88.8 ± 0.9, and 73.8 ± 1.0%, respectively. Importantly, [Bmim][TOS] could be recycled up to five times without a significant decrease in PAHs removal. The quantum chemistry calculations and spectrum analyses were conducted to study the interactions between ILs and PAHs, using BaP as a model compound. The ability of [Bmim][TOS] to remove PAHs originate its high hydrogen bond accepting ability and the collaborative hydrogen bond interactions between the PAHs and ILs.