Harvesting electrical energy from water and moisture has emerged as a novel ecofriendly energy conversion technology. Herein, a multifunctional asymmetric polyaniline/carbon nanotubes/poly(vinyl alcohol) (APCP) that can produce electric energy from both saline water and moisture and generate fresh water simultaneously is developed. The constructed APCP possesses a negatively charged porous structure that allows continuous generation of protons and ion diffusion through the material, and a hydrophilicity–hydrophobic interface which results in a constant potential difference and sustainable output. A single APCP can maintain stable output for over 130 h and preserve a high voltage of 0.61 V, current of 81 µA, and power density of 82.4 µW cm−3 with 0.15 cm3 unit size in the water-induced electricity generation process. When harvesting moisture energy, the APCP creates dry-wet asymmetries and triggers the spontaneous development of electrical double layer with a current density of 1.25 mA cm−3, sufficient to power small electronics. A device consisting of four APCP can generate stable electricity of 3.35 V and produce clean water with an evaporation rate of 2.06 kg m−2 h−1 simultaneously. This work provides insights into the fabrication of multifunctional fabrics for multisource energy harvesting and simultaneous solar steam generation.