**1. Introduction**

The heavy metal contamination resulting from mining, smelting activities, exhaust gas discharge, and sewage irrigation has detrimental e ffects on human health and environmental sustainability. Recent studies have consistently shown an association between heavy metal pollution and physical discomfort, and even death, in humans [1]. However, because of their poor degradability, dissolved heavy metal ions normally need to be physically removed from wastewater by immobilization techniques such as ion exchange, flocculation, membrane filtration, and adsorption [2]. Even though these approaches aid the removal of heavy metals from wastewaters, they generate large quantities of sewage sludge. It is estimated that over 8 × 10<sup>6</sup> tons of sewage sludge are generated each day from wastewater treatment plants in China [3],which takes further issue in sludge handling and final disposal.

As an important residue produced from wastewater treatment, sewage sludge recovery and recycling are always considered as an adequate challenge in wastewater managemen<sup>t</sup> [1]. Sewage sludge landfill, incineration processes, soil application, and dumping at sea are considered as the most e ffective methods for the disposal of waste sludge in many countries due to high availability and relatively low costs [4]. As for China, more than 80% of sludge was dumped improperly, followed by sanitary landfill (13.4%), building materials (2.4%), incineration (0.36%), and land application (0.24%) [5]. However, these techniques are highly controversial due to serious secondary pollution from leachate and air emissions, which is reflected in the significantly high heavy-metal levels found in the vicinity. Therefore, some authors have stressed that traditional wastewater treatment will only shift the problem from water contamination to soil and air pollution, and the potential risks of heavy metals could be greatly reduced, but cannot be entirely eliminated [6]. It is a fact that sewage treatment plants and relevant enterprises are still struggling with rising costs from sludge transport and disposal, and the seeking of the integration planning between environmental protection and sustainable development has become increasingly pronounced.

More recently, attempts have been made to transform environmental waste products into advanced energy conversion and storage materials through direct thermal disposal of sewage sludge [7]. This is particularly crucial for economic and social development since it o ffers both environmental and energy benefits. Supercapacitors, as new energy storage devices, have garnered grea<sup>t</sup> attention in recent years [8]. Carbon-based materials are one of the most widely used electrodes for supercapacitors with desired physical and chemical characterizations [9]. However, they constantly demonstrate lower capacitance and inferior energy density. The use of electrode materials possessing pseudo-capacitance is vital to ensure high capacity as well as high energy and power density [10]. Hence, one of the most significant approaches in the fabrication of high-capacitance materials is the incorporation of transition metals into carbon frameworks. Previous research has demonstrated an obvious enhancement in the electrochemical performance of carbon materials through metal-doping (Mn [11], Ni [12], Co [13], Fe [14]), which can store and release energy reversibly through surface redox reactions and display considerably higher specific capacitance through an additional pseudocapacitive storage contribution between the electro-active materials and the electrolyte [15]. However, expensive metal-doped precursors were used, which makes the synthetic processes costly and di fficult to scale-up [16]. Thus, the generation of a low-cost and abundant metal-containing precursor to fabricate high-quality electrode materials is extremely desirable.

Most sewage sludge are naturally rich in carbon (derived from organic polymer flocculants) and heavy metals (e.g., Mn, Cu, Zn, Pb, Cr, and Cd) [17]. Utilizing this heavy metal-contaminated sewage sludge as precursors, metal-doped carbon materials can be prepared on a large scale and at a relatively low cost without any additional metal salts. In addition, some heavy metal oxides can store and release energy reversibly through surface redox reactions between the electro-active materials and the electrolyte, which usually display considerably higher specific capacitance through an additional pseudocapacitive storage contribution [15]. More importantly, the heavy metals would be confined within the carbon frameworks by the complete pyrolysis of sludge, which e ffectively eliminates the transference of toxic heavy metal. To the best of our knowledge, very few research e fforts have been made so far to synthesize metal-doped carbon materials from heavy metal-contaminated sewage sludge. In addition, a number of studies have reported that the preparation and electrochemical performances of electrode materials are sensitive to the composition and structure of the precursor [18]. Generally, the composition of sewage sludge (flocculants and metal) could be easily controlled by the flocculation coe fficient during the wastewater treatment process [19]. Therefore, the recycling of waste sludge in an environmentally and economically acceptable way would involve wastewater treatment processes in the early stage.

The main aim of this paper was to study the e ffects of flocculation conditions on physical properties and pyrolysis products of sludge floc. While dissolved metal pollutants can be removed e fficiently from wastewaters by means of the coagulation–flocculation process, they also generate large quantities of toxic sewage sludge. Therefore, we developed a facile, cost-e ffective, and green approach to synthesize a series of Cu-doped carbon materials through direct carbonization of Cu(II)-containing sludge and their application in energy storage systems (Scheme 1). A starch-based flocculant containing ionizable carboxyl group was synthesized and used as a promising flocculant for heavy metal ion (Cu(II)) flocculation from wastewaters. The effects of flocculant dose and pH were studied for the flocculation of Cu(II) from wastewater using batch studies mode. Sewage sludge with different Cu(II) flocculation capacity were employed as direct precursors for the synthesis of Cu-doped carbon materials. The influence of Cu(II) flocculation capacity on the pyrolysis of sewage sludge and electrochemical performances of electrode material was investigated. The effect of metal content, morphology, and pore structure of the resultant electrode materials on the electrochemical energy storage properties were discussed. Finally, the Cu(II) removal efficiency has also been evaluated relative to possible energy storage benefits, as well as to cost and purification efficiency from wastewater treatment operations.

**Scheme 1.** Fabrication of Cu-doped carbon materials using Cu(II)-containing sewage sludge.

#### **2. Materials and Methods**
