Colonization of Helicobacter pylori (H. pylori) induces immune and inflammatory response in gastric mucosa. Trimethylamine N-oxide (TMAO), from diet and metabolite through the action of gut microbiota, has been linked to inflammatory diseases. To investigate the effects of TMAO and H. pylori infection on gene expression in gastric epithelial cells, Human gene chip Affymetrix HTA 2.0 was used in this study. 1312 genes were identified as differentially expressed genes in GES-1 cells with H. pylori and TMAO co-treatment compared to the control. GO and KEGG analyses indicated that the functions of these differentially expressed genes were related closely with immune inflammation. GO-network showed that Toll-like receptor signaling pathway was the most important biological processes and 49 up-regulated genes related to immune inflammation were obtained. The synergistic effects of H. pylori and TMAO enhanced the genes expression of IL-6, CXCL1, CXCL2, FOS and C3 related to immune inflammation in comparison with those of non-infected control cells, H. pylori-infected cells, and TMAO-stimulated cells. RT-PCR verified the expression levels of IL-6, CXCL1. Additionally, expression levels of 2053 genes were altered and 52 immunoinflammatory genes were upregulated in comparison with H. pylori-infected cells. This study suggested that TMAO altered the expression levels of immunoinflammatory genes induced by H. pylori infection, and the synergistic effects of H. pylori and TMAO provided novel insights into the development of chronic gastritis, gastric ulcer and gastric cancer.