Indoor formaldehyde (CH2O) exceeding the recommended level is a severe threat to human health. Few studies have investigated its effect on indoor surface bacterial communities, affecting habitants' health. This study used 20-L glass containers to mimic the indoor environment with bacterial inputs from human oral respiration. The behavior of bacterial communities responding to CH2O varied among the different CH2O levels. The bacterial community structure significantly changed over time in the 0.054 mg·m−3 CH2O group, which varied from the 0.1 mg·m−3 and 0.25 mg·m−3 CH2O groups. The Chao1 and Shannon index significantly increased in the 0.054 mg·m−3 CH2O group at 6 week, while they remained unchanged in the 0.25 mg·m−3 CH2O group. At 12 week, the Chao1 significantly increased in the 0.25 mg·m−3 CH2O group, while it remained unchanged in the 0.054 mg·m−3 CH2O group. Only a few Operational Taxonomic Units (OTUs) significantly correlated with the CH2O concentration. CH2O-induced OTUs mainly belong to the Proteobacteria and Firmicutes. Furthermore, bacterial communities formed at 6 or 12 weeks differed significantly among different CH2O levels. Functional analysis of bacterial communities showed that inferred genes related to chemical degradation and diseases were the highest in the 0.25 mg·m−3 CH2O group at 12 weeks. The development of nematodes fed with bacteria collected at 12 weeks was applied to evaluate the bacterial community's hazards. This showed significantly impaired growth in the 0.1 mg·m−3 and 0.25 mg·m−3 CH2O groups. These findings confirmed that CH2O concentration and exposure time could affect the indoor bacterial community and formed bacterial communities with a possibly more significant hazard to human health after long-term exposure to high CH2O levels.