Heteroatom-doped carbon plays a vital role in the field of energy storage and conversion, and the synthesis of them has intimate relation with doping pathways. In this work, a facile two-step doping pathway, i.e., hydrothermal method followed by thermal annealing process, was employed to prepare annealed three-dimensional N,S-codoped graphene framework (3D A-NSG). The morphology, structure, composition, and related electrochemical performance were all studied. The results showed that A-NSG possessed typical 3D thin nanosheets, much increased specific surface area and structural defects, strengthened conductivity, and optimized N and S configurations (especially for dominated pyridinic N as well as graphitic N and –C–S–C–). As a result, A-NSG presented much better capacitance and oxygen reduction reaction performance than the counterparts. Apparently, our work offers a good guidance on the synthesis of advanced heteroatom-doped carbon materials by adjusting the doping strategy.