Hydrogen production in a microbial electrolysis cell (MEC) can be achieved by either setting the anode potential with a potentiostat, or by adding voltage to the circuit with a power source. In batch tests the largest total gas production (46 ± 3 mL), lowest energy input (2.3 ± 0.3 kWh/m 3 of H2 generated), and best overall energy recovery (E+S = 58 ± 6%) was achieved at a set anode potential of EAn = -0.2 V (vs Ag/AgCl), compared to set potentials of -0.4 V, 0 V and 0.2 V, or an added voltage of Eap = 0.6 V. Gas production was 1.4 times higher with EAn = -0.2 V than with Eap = 0.6 V. Methane production was also reduced at set anode potentials of -0.2 V and higher than the other operating conditions. Continuous flow operation of the MECs at the optimum condition of EAn = -0.2 V initially maintained stable hydrogen gas production, with 68% H2 and 21% CH4, but after 39 days the gas composition shifted to 55% H2 and 34% CH 4. Methane production was not primarily anode-associated, as methane was reduced to low levels by placing the anode into a new MEC housing. These results suggest that MEC performance can be optimized in terms of hydrogen production rates and gas composition by setting an anode potential of -0.2 V, but that methanogen proliferation must be better controlled on non-anodic surfaces. © 2011, Hydrogen Energy Publications, LLC. Published by Elsevier Ltd. All rights reserved.