The ever-growing environment pollution and the decreasing fossil fuels are forcing people to develop renewable energy sources, such as solar, wind and hydro energy. However, these energy sources hardly meet the demands due to the limitations of the seasonal and geographical variations. The secondary rechargeable batteries with high energy density and long cycle-life are more suitable to fulfill the increasing energy requirements of modern portable electronic devices and electric vehicles. Even though the conventional lithium ion batteries (LIBs) have been commercialized, severe drawbacks, such as limited energy density, high cost, and toxicity are impeding the further developments. Metal-sulfur batteries (e.g. lithium sulfur and sodium sulfur batteries) are especially attractive. Sulfur as the cathode active material is not only abundant and cheap, but also possesses high theoretical capacity of 1675 mAh g-1. Therefore, lithium sulfur (Li-S) and room temperature sodium sulfur (RT Na-S) batteries are considered as promising candidates for the next generation power sources. Li-S batteries with high energy density and long cycle life are mainly for operation of EVs. In contrast, RT Na-S batteries with low cost and sufficient energy density are aiming for the stationary energy. However, poor electrical conductivity of both elemental sulfur and its final products leads to low utilization of active material and poor rate capability. Moreover, the soluble high-order polysulfides (S_n^(2-), 4≤n≤8) that are generated during the discharge process can easily dissolve into the electrolyte and shuttle between cathode and anode electrodes (termed as ‘shuttle phenomenon’), resulting in severe capacity loss and short cycle life. Also, the large volume change during charge-discharge progress can lead to cracks in the electrode and thus cause severe capacity fading and potential safety risk. These challenges become more serious when sulfur loading is increased to the practically accepted level above 3-5 mg cm-2. It is worth emphasizing that the above issues are intensified in RT Na-S batteries in contrast to Li-S batteries.To overcome these limitations, researchers worldwide have made many efforts for Li-S and RT Na-S batteries, such as design of cathode electrode, modification of separator, optimization of electrolyte, and protection of anode electrode. For the cathode electrode, the porous carbon matrix as one of effective method to encapsulate sulfur and confine polysulfides has been widely studied.On the basis of previous research, a nitrogen-doped mesoporous carbon (CPAN-800) via in-situ polymerization of polyacrylonitrile (PAN) in SBA-15 template followed by carbonization at 800 oC has been synthesized, which possesses many desirable properties such as high specific surface area and pore volume, moderate nitrogen content, and highly ordered mesoporous structure. The nitrogen doping in carbon matrix not only can effectively improve the wettability of electrolyte and increase electric conductivity of carbon but also can facilitate the chemical adsorption of polysulfides. Herein, the S/CPAN-800 composite was proved to be an excellent material for Li-S cells which delivered a high initial discharge capacity of 1585 mAh g-1 and enhanced capacity retention of 862 mAh g-1 at 0.1C after 100 cycles. Following the trail of CPAN-800, a new strategy was introduced to synthesize a highly ordered mesoporous sulfurized PAN (MSPAN) composite by the direct sulfurization of PAN in an ordered mesoporous structured SBA-15 template. MSPAN as a cathode active material possesses the outstanding properties like the high sulfur utilization, high Coulombic efficiency, and excellent cycling stability especially at high C-rates. The capacity retention of the MSPAN cell was 755 mAh g-1 after 200 cycles at 1 C and 610 mAh g-1 after 900 cycles at 2 C. Even at a higher rate of 5 C, the composite showed reasonable capacity retention. The superior performance of MSPAN composite was attributed to its highly porous structure, which could effectively improve the wettability, accessibility, and absorption of electrolyte, facilitating rapid ion transfer in Li-S batteries.In order to enhance the sulfur loading in the electrode, a freestanding porous sulfurized polyacrylonitrile/vapor grown carbon fiber (SVF) composite was prepared as cathode material for high-performance Li-S batteries by a facile electrospinning technique. SVF composite not only possesses high sulfur utilization, high Coulombic efficiency, and excellent cycling stability but also has the flexible property, essential to the development of flexible batteries. The capacity retentions of the SVF cell were 903 mAh g-1 after 150 cycles at 1 C and 600 mAh g-1 after 300 cycles at 2 C. At a high rate of 4 C the SVF composite showed reasonable capacity retention. The superior performance of SVF composite was attributed to the highly porous structure, which effectively improved the accessibility of electrolyte to facilitate rapid ion transfer in the cell, and the vapor-grown carbon fibers embedded inside SVF as a carbon material notably enhanced the electrical conductivity of the cell, guaranteeing the electrochemical performance at a high C-rate.A novel structural configuration, including a dual-type carbon (DPC) as the sulfur host and gel polymer electrolyte (GPE), has been designed for Li-S batteries, which can be expected to restrain the soluble polysulfides migration, and further enhance the electrochemical performance and prolong the cycle life. The micropores in the DPC as the main storage space can confine the polysulfides due to the limited space. The mesopores in the DPC can improve the accessibility of electrolyte, facilitating rapid ion transfer in the cell. In addition, DPC derived from waste coffee grounds, is rich in the various heteroatoms, such as N, O, S elements, which not only can improve the electric conductivity of carbon matrix, but also can immobilize the polysulfides via strong chemical binding. GPE not only can intercept the polysulfides, but also can minimize the leakage of the flammable liquid, improving the safety performance. As results, excellent capacity retention and cycling stability of sulfur/DPC (S/DPC) cell were obtained, even at high C-rates. The good capacity retention of S/DPC cell was 530 mAh g-1 at 1 C and 320 mAh g-1 at 4 C after 600 cycles, respectively. The outstanding long-term cycle durability with only 0.03% capacity attenuation per cycle was retained over 1500 cycles at 0.5 C-rate. The S/DPC cell also possesses excellent rate performances. Even at a higher rate of 10 C, the reasonable capacity retention also was shown. These results indicate the novel structural configuration is an effective strategy for enhancing the electrochemical performance and prolong cycle life in Li-S batteries.A honeycomb-like porous carbon (HPC) with rich heteroatoms doping derived from waste coffee grounds has been synthesized by a facile chemical redox activation for RT Na-S battery. The obtained HPC possesses hierarchically porous structure, including macro-, meso- and micropores. The macro- and mesopores can provide a pathway for the electrolyte and sodium ions, facilitating rapid reaction kinetics in the cell. The micropores can confine the small sulfur molecules of S2-4 due to the limited space, preventing the formation of long-chain sodium polysulfides (Na2Sn, 4 < n ≤ 8). The rich heteroatoms (N, O, S) co-doping in the HPC carbon matrix can create the active sites to improve the electrical conductivity, and build up an interaction between carbon and sulfur species to inhibit polysulfide shuttling. Such dually physical and chemical sulfur confinement, a high initial discharge capacity of 1670 mAh g-1 at 0.1C and a superior capacity retention of 674 mAh g-1 at 0.5 C after 200 cycles were obtained. This study offers an appealing trend of electrochemical materials derived from environmental pollutants for the low-cost and sustainable RT Na-S batteries, as well as rational structural design for enhancing electrochemical performance.