Six N-alkylpyridiniumbased ionic liquids, N-butylpyridinium nitrate ([BPy]NO3), N-ethylpyridinium nitrate ([EPy]NO3), N-butylpyridinium tetrafluoroborate ([BPy]BF4), N-ethylpyridinium tetrafluoroborate ([EPy]BF4), N-ethylpyridinium acetate([EPy]Ac), N-butylpyridinium acetate([BPy]Ac) were prepared and tested in the extraction desulfurization of gasoline. It is found that [BPy]BF4 has the best effect on the selective removal of sulfurcontaining compounds from gasoline at room temperature among these ionic liquids. The extraction rate of [BPy]BF4 is 45.5%. The desulfurization effect of [EPy]BF is the lowest. The used ionic liquids can be regenerated by rotary evaporation or re-extraction using tetrachloromethane.