Over the past decades, water pollution has been suggested as the leading factor to infectious diseases. There has been a worldwide concern to use photocatalysts to degrade organic pollutants in waste water. However, the requirement of light assistance in degradation process has limited the application of photocatalysts. In this paper, MoS2/PDMS nanocomposite was fabricated in order to overcome this problem. The results showed that MoS2/PDMS nanocomposite can provide a high degradation activity to purify the waste water without light assistance. The MoS2/PDMS nanocomposite preserved an activity of 67% toward dye Rhodamine B degradation even in the fourth cycling test. We found that the high degradation activity of MoS2/PDMS nanocomposite was based on the piezo-catalytic effect of single- and few-layers MoS2 nanoflowers in the nanocomposite. We also demonstrated that MoS2/PDMS nanocomposite was a useful material in the fabrication of nanogenerator to harvest waste water energy. Through the direct coating of MoS2/PDMS nanocomposite on a metal grid, electric outputs of 23 V and 13 mA/m(2) can be generated when a water flow (20 mL/s) was passing the nanogenerator. In addition, when coating MoS2/PDMS nanocomposite on a flat electrode and placing it inside a water pipe, the nanogenerator could not only act as the source of electric output, but also as a self-powered sensor to locate the water passage route and/or the contamination areas in the waste water.