Background The role of the gastric microbiome in the pathophysiology of gastritis beyond Helicobacter pylori (HP) infection is poorly understood and has remained unexplored in patients with obesity. The aim of this study was to analyse gastric mucosa-associated microbiota in patients with obesity and nonatrophic chronic gastritis in the absence of HP infection or history of HP eradication. Methods This was a case–control study conducted at Virgen de la Victoria University Hospital in Malaga, performed in patients with severe obesity (body mass index ≥40 kg/m2) undergoing sleeve gastrectomy, without HP infection and no history of HP eradication. Gastric biopsy specimens were collected at surgery and were analysed by 16S rRNA sequencing. Participants were divided into two groups according to the histological evaluation: nonatrophic chronic gastritis and nongastritis. An exploratory prospective analysis to determine the influence of gastritis on short-term outcomes after surgery was also performed. Results Sixty-seven participants (38 in the gastritis and 29 in the nongastritis group) were included. A lower alpha diversity (evenness and Shannon diversity indexes) and beta diversity (weighted Unifrac distance) were shown in the gastritis group. Higher relative abundances in the families Micrococcaceae, Streptococcaceae and Leuconostocaceae and the genera Streptococcus, Weissella and Cryptobacterium were observed in the gastritis group, compared with the nongastritis group. An enrichment in pathways involved in toluene degradation, heterolactic fermentation and secondary metabolites biosynthesis, such as ergothioneine and terpenoids, was found in the gastritis group. Also, higher total cholesterol levels 1 year after the surgery were observed in the gastritis group compared with the nongastritis group, although no within-group differences from baseline to 1 year were detected in this parameter.