The efficiency of direct methanol fuel cells (DMFC) is determined by the oxygen reduction reaction (ORR) of the cathode and the methanol oxidation reaction (MOR) of the anode. As a consequence, current research concentrates on the creation of efficient and stable electrocatalysts to expedite the slow kinetics of ORR and MOR. In this work, three-dimensional porous network non-metallic nitrogen/sulfur co-doped carbon nanosheets (N/SC) as cathode oxygen reduction electrocatalysts were synthesized using protonated histidine ionic liquids as the precursor, g-C3N4 as the porogen and in-situ nitrogen dopant. Among them, the N/SC800 possesses a high specific surface area with a layered porous structure, and the doping components are equally distributed and rich in nitrogen. For ORR, the N/SC800 had an onset potential (0.985 V) and a half-wave potential (0.841 V), and its durability and methanol tolerance were overmatched to commercial Pt/C. Additionally, Pt nanoparticles supported on N/SC800 (Pt@N/SC800) were prepared by the ethylene glycol reduction and used in the methanol oxidation, outperforming Pt/C in methanol oxidation activity and stability. This work provides a strategy for the synthesis of highly efficient ionic liquid-based bifunctional electrocatalysts.