Altered microbiota can affect gut-liver-brain axis in cirrhosis and hepatic encephalopathy (HE), but the impact of sex on these changes is unclear. We aimed to determine differences in fecal microbiota composition/functionality in men compared to women with cirrhosis and HE on differing treatments.Men and women with cirrhosis and controls underwent stool microbiome composition (16srRNA sequencing) and microbial functional analysis between groups cross-sectionally. HE on rifaximin+lactulose(HE-Rif), HE on lactulose only(HE-Lac) and cirrhosis without HE(No-HE) were compared to controls within men and then within women using random forest classifier. Men and women were also compared.761 subjects, 619 cirrhosis (466 men,153 women) and 142 controls (92 men, 50 women) were included. Men were older and used more PPI but MELD score, No-HE (n=319), HE-lac (n=130) and HE-Rif (n=170) proportion were similar. PPI/age-adjusted AUC of differentiation between controls versus cirrhosis, and controls versus No-HE were higher within women than men but was reversed No-HE versus HE-Lac. Control versus HE-Rif differentiation was similar across sexs. Men versus women were different in all cirrhosis, No-HE and HE-Lac but not HE-Rif on PERMANOVA and AUC analyses. Autochthonous taxa decreased and pathobionts increased with disease progression regardless of sex. In men, Lactobacillaceae were higher in HE-Lac but decreased in HE-Rif, with Veillonellaceae. Pathways related to glutamate and aromatic compound degradation were higher in men at all stages. Degradation of androstenedione, an estrogenic precursor, was lower in men versus women in HE-Rif, likely enhancing feminization.In this cross-sectional study, there is a sex difference with HE therapies focused on Lactobacillaceae and Veillonellaceae and androstenedione degradation. Further studies linking these to sex-specific outcomes are needed.