Bile acid (BA) imbalance may be directly associated with gastric cancer and indirectly influence stomach carcinogenesis via overexpression of histidine decarboxylase (HDC), which converts histidine (His) into histamine (HIST). Moreover, the progression of gastric cancer, could change the gut microbiome, including bacteria spp. that produce secondary BAs. Gastric juice has various metabolites that could indicate gastric cancer-related stomach conditions. Therefore, profiling of HIST, His, and BAs in gastric juice is crucial for understanding the etiological mechanisms of gastric cancer. We used a profiling method to simultaneously determine targeted metabolites in gastric juice using liquid chromatography-tandem mass spectrometry (LC-MS/MS). We successfully analyzed 70 human gastric juice samples from patients with chronic superficial gastritis (CSG, n = 20), intestinal metaplasia (IM, n = 12), and gastric cancer (n = 38). Furthermore, we investigated the relevance between BA metabolism and gastric cancer. There were statistical differences in the metabolism of cholic acid (CA) into deoxycholic acid (DCA) based on the progression of CSG into IM and gastric cancer. Hence, the progression of gastric cancer might be related to the alterations in gut microbiome composition. We provide insight into the etiological mechanisms of the progression of gastric cancer and biomarkers to diagnose and treat gastric cancer.