The binding energy was calibrated using C1s at 284.8 eV. Data analysis of XPS results was carried out using CasaXPS and high-resolution peaks were deconvoluted using Gaussian-Lorentzian function. UV-vis spectra of the discharged electrodes were measured using UV-Vis spectrophotometer (Shimadzu, UV 2600) in the wavelength range of 200 to 800 nm. The Xray absorption near edge structure (XANES) spectroscopy measurements of MoS2 electrodes were carried out at B18 beamline of Diamond Light Source, UK. The Mo K-edge of all the samples were sealed in an aluminum pouch case inside a glove box preventing exposure to air.