Cobalt phthalocyanines (CoPc(Cl)n) were synthesized by a microwave method and characterized by UV-Vis spectroscopy, FTIR, elemental analysis and ICP. Dibenzothiophene (DBT) was oxidized with air as the oxidant and cobalt phthalocyanines (CoPc(Cl)n) as catalysts in an ionic liquid at room temperature and atmospheric conditions. The removal ratio of DBT reached 90.0% at room temperature after 2 h, with 0.3 wt% of CoPc(Cl)16 in an ionic liquid, and the ratio of the ionic liquid to the model oil was 1.8 : 1 at room temperature. The effect of the substituents on the cobalt phthalocyanines on their catalytic activities was investigated. The results show that the catalytic activity of cobalt phthalocyanines with different substituents increases in the order CoPc(Cl)4 < CoPc(Cl)8 < CoPc(Cl)12 < CoPc(Cl)16, indicating that electron-withdrawing group substituents have a positive effect on the catalytic properties. The activity of CoPc(Cl)16 was kept unchanged after 5 runs of oxidation. The oxidation product detected by FTIR and mass spectrometry was single DBTO2. The desulfurization of different sulfur compounds and real gasoline was also investigated in this system. The sulfur removal ratio of five different sulfur compounds was over 80%. The sulfur content in real gasoline (1000 ppm) was decreased to 30 ppm after desulfurization.