An ultrasensitive electrochemical detection of heavy metal ions is achieved via defect- and phase-engineering of Mn-mediated MoS2 nanosheets.