A Microbial electrolysis cell (MEC) was designed to produce a useful and valuable product, hydrogen gas, during the wastewater treatment process. Hydrogen can be produced using the MEC with an applied voltage of over 0.4 V, and the hydrogen yields gradually increased with the increasing of applied voltage. A maximum overall hydrogen efficiency of 21.2% was achieved at an applied voltage of 1.0 V with acetate as substrate, corresponding to a volumetric hydrogen production rate of approximately 0.095 m 3 H 2 /m 3 reactor liquid volume/day. A volumetric hydrogen production rate of 0.061 m 3 H 2 /m 3 reactor liquid volume/day was achieved when piggery wastewater was fed to the MEC, and the chemical oxygen demand removal rate ranged from 45 to 52%. The results demonstrated that the wastewater, especially an organic-rich item such as piggery wastewater, could be feasibly treated based on this MEC system.