Fecal samples from participants aged 60–80 were collected and sequenced by a high-throughput second-generation sequencer to explore the structural composition of gut microbiota in elderly patients with hepatocellular carcinoma(HCC). Comparison of gut microbiota between patients with hepatocellular carcinoma and healthy controls, α diversity and β diversity were statistically different. At the genus level, compared with the normal group, the abundance of A Blautia, Fusicatenibacter, Anaerostipes, Lachnospiraceae_ND3007_group, CAG-56, Eggerthella, Lachnospiraceae_FCS020_group and Olsenella were decreased significantly in the LC group. In contrast, the abundance of Escherichia-Shigella, Fusobacterium, Megasphaera, Veillonella, Tyzzerella_4, Prevotella_2 and Cronobacter increased significantly. The KEGG and COG pathway analyses showed that the dysbiosis of gut bacteria in primary liver carcinoma is associated with several pathways, including amino acid metabolism, replication and repair, nucleotide metabolism, cell motility, cell growth and death, and transcription. Age is negatively associated with the abundance of Bifidobacterium. Lachnospiraceae_ ND3007_ group, [Eubacterium]_hallii_group, Blautia, Fuscatenibacter and Anaerostipes are negatively correlated with ALT, AST and GGT levels (p < 0.05), respectively. Alpha-fetoprotein (AFP) is positively associated with the abundance of Erysipelatoclostridium, Magasphaera, Prevotella 2, Escherichia-Shigella, Streptococcus and [Eubacterium]_eligens_group (p < 0.05), respectively. A random forest model showed that the genera Eggerthella, Anaerostipes, and Lachnospiraceae_ ND3007_ group demonstrated the best predictive capacity. The area under the Receiver Operating Characteristic Curve of Eggerthella, Anaerostipes and Lachnospiraceae_ ND3007_ group are 0.791, 0.766 and 0.730, respectively. These data are derived from the first known gut microbiome study in elderly patients with hepatocellular carcinoma. Potentially, specific microbiota can be used as a characteristic index for screening, diagnosis, and prognosis of gut microbiota changes in elderly patients with hepatocellular carcinoma and even as a therapeutic clinical target.