The development of efficient and durable catalyst for oxygen reduction reaction (ORR) is critical for the practical application of proton exchange membrane fuel cell (PEMFC). A novel imidazole based ionic liquid is synthesized in this study and used subsequently for the preparation of a N and S co-doped metal-free catalyst with three dimensional ordered microstructure. The catalyst prepared at 1100 °C showed improved ORR catalytic performance and stability compared to commercial Pt/C catalyst. We demonstrate that the high graphitic N content and high degree of graphitization of the synthesized catalyst is responsible for its superb ORR activity. Our results suggest that the N and S co-doped metal-free catalyst reported here is a promising alternative to traditional ORR catalyst based on noble metal. Furthermore, the current study also demonstrate that importance of morphology engineering in the development of high performance ORR catalyst.