Food and other environmental factors affect gene expression and behaviour of animals. Differences in bacterial food affect the behaviour and longevity of Caenorhabditis elegans. However, no research has been carried out to investigate whether bacteria could utilize endogenous RNAs to affect C. elegans physiology. Here we show that two Escherichia coli endogenous noncoding RNAs, OxyS and DsrA, impact on the physiology of C. elegans. OxyS downregulates che-2, leading to impairment in C. elegans chemosensory behaviour and DsrA suppresses diacylglycerol lipase gene F42G9.6, leading to a decrease in longevity. We also examine some genes in the C. elegans RNA interference pathway for their possible involvement in the effects of OxyS and DsrA. Other bacteria, such as Bacillus mycoides, may also utilize its noncoding RNAs to interfere with gene expression in C. elegans. Our results demonstrate that E. coli noncoding RNAs can regulate gene expression and physiological conditions of C. elegans and indicate that noncoding RNAs might have interspecies ecological roles.