BackgroundThe human gut microbiota (GM) is involved in the pathogenesis of hypertension (HTN), and could be affected by various factors, including sex and geography. However, available data directly linking GM to HTN based on sex differences are limited.MethodsThis study investigated the GM characteristics in HTN subjects in Northwestern China, and evaluate the associations of GM with blood pressure levels based on sex differences. A total of 87 HTN subjects and 45 controls were recruited with demographic and clinical characteristics documented. Fecal samples were collected for 16S rRNA gene sequencing and metagenomic sequencing.ResultsGM diversity was observed higher in females compared to males, and principal coordinate analysis showed an obvious segregation of females and males. Four predominant phyla of fecal GM included Firmicutes, Bacteroidetes, Actinobacteria and Proteobacteria. LEfSe analysis indicated that phylum unidentified_Bacteria was enriched in HTN females, while Leuconostocaceae,WeissellaandWeissella_cibariawere enriched in control females (P < 0.05). Functionally, ROC analysis revealed that Cellular Processes (0.796, 95% CI 0.620 ~ 0.916), Human Diseases (0.773, 95% CI 0.595 ~ 0.900), Signal transduction (0.806, 95% CI 0.631 ~ 0.922) and Two-component system (0.806, 95% CI 0.631 ~ 0.922) could differentiate HTN females as effective functional classifiers, which were also positively correlated with systolic blood pressure levels.ConclusionsThis work provides evidence of fecal GM characteristics in HTN females and males in a northwestern Chinese population, further supporting the notion that GM dysbiosis may participate in the pathogenesis of HTN, and the role of sex differences should be considered.Trial registrationChinese Clinical Trial Registry, ChiCTR1800019191. Registered 30 October 2018 – Retrospectively registered,http://www.chictr.org.cn/.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12967-023-04176-6.