Abstract Symbiotic microorganisms that inhabit the gut of Coptotermes formosanus enable this termite to degrade lignocelluloses and further produce hydrogen as an important intermediate to be recycled in its hindgut or as a byproduct to be emitted to the atmosphere. Both symbiotic protists and prokaryotes in the guts of termites demonstrated some different roles with respect to hydrogen production. In this study, the effects of two antibiotics, ampicillin and tetracycline, on hydrogen emission and the gut symbionts of C. formosanus were investigated. Hydrogen emission from termite guts was significantly enhanced when termites fed on wood diets treated with either ampicillin or tetracycline. The greatest H2 emission rates, 2 519 ± 74 and 2 080 ± 377 nmol/h/g body weight, were recorded with the treatments of ampicillin and tetracycline, respectively, which showed 6–7 times more H2 production than that of controls. Antibiotic-treated diets negatively affected the prokaryotic communities and reduced their abundances, particularly on those ectosymbionts inhabiting the gut walls or in the gut fluid of C. formosanus, such as spirochetes. However, no significant reductions in the counts of gut cellulolytic protists, Pseudotrichonympha grassii and Holomastigotoids hartmanni, were recorded; and with a further observation by confocal laser scanning microscopy, the endosymbionts inhabiting P. grassii generally survived the antibiotic treatments. These results suggest that some prokaryotes may serve as the main hydrogen consumers, while P. grassii, together with its endosymbionts, may function as the main contributors for hydrogen production in the hindgut of C. formosanus.