Bacteria serve as live food and nutrients for bacterial-feeding nematodes (BFNs) in soils, and influence nematodes behavior and physiology through their metabolism. Five bacterial taxa (Bacillus amyloliquefaciens JX1, Variovorax sp. JX14, Bacillus megaterium JX15, Pseudomonas fluorescens Y1 and Escherichia coli OP50) and the typical BFN Caenorhabditis elegans were selected to study the effects of bacterial respiration and growth rates on the feeding preferences, brood size and lifespan of nematodes. P. fluorescens Y1 and E. coli OP50 were found to be more active, with high respiration and rapid growth, whereas B. amyloliquefaciens JX1 and B. megaterium JX15 were inactive. The nematode C. elegans preferred active P. fluorescens Y1 and E. coli OP50 obviously. Furthermore, worms that fed on these two active bacteria produced more offspring but had shorter lifespan, while inactive and less preferred bacteria had increased nematodes lifespan and decreased the brood size. Based on these results, we propose that the bacterial activity may influence the behavior and life traits of C. elegans in the following ways: (1) active bacteria reproduce rapidly and emit high levels of CO2 attracting C. elegans; (2) these active bacteria use more resources in the nematodes' gut to sustain their survival and reproduction, thereby reducing the worm's lifespan; (3) inactive bacteria may provide less food for worms than active bacteria, thus increasing nematodes lifespan but decreasing their fertility. Nematodes generally require a balance between their preferred foods and beneficial foods, only preferred food may not be beneficial for nematodes.