Using hydrogen derived from surplus green energy (e.g., solar and wind) to convert carbon dioxide to acetate via homoacetogens represents a promising technology for simultaneous biogas upgrading and biochemical production. However, effects of hydrogen sulfide and ammonia on activities of homoacetogens remain unknown, hindering their applications in biogas upgrading. This study investigated the impacts of ammonia and sulfide on homoacetogen-dominated microbial community for biogas upgrading process by combining short-term batch tests and long-term membrane biofilm reactor (MBfR) operation. Results showed that sulfide concentrations ≤ 2 mM TDS (total dissolved sulfide) increased H