Carbon materials are effective substitutes for Pt counter electrodes (CEs) in dye-sensitized solar cells (DSSCs). However, many of these materials, such as carbon nanotubes and graphene, are expensive and require complex preparation process. Herein, waste lignin, recycled from hazardous black liquors, is used to create oxygen-nitrogen-sulfur codoped carbon microspheres for use in DSSC CEs through the facile process of low-temperature preoxidation and high-temperature self-activation. The large number of ester bonds formed by preoxidation increase the degree of cross-linking of the lignin chain...