Abstract Background On the front lines of climate change, glacier termini play crucial roles in linking glaciers and downstream ecosystems during glacier retreat. However, we lack a clear understanding of biological processes that occur in surface and basal ice at glacier termini. Methods Here, we studied the bacterial communities in surface ice and basal ice (the bottom layer) of a glacier terminus in the Yangtze River Source, Qinghai–Tibet Plateau. Results Surface and basal ice harbored distinct bacterial communities but shared some core taxa. Surface ice communities had a higher α-diversity than those in basal ice and were dominated by Proteobacteria, Firmicutes, Bacteroidetes, Actinobacteria, and Cyanobacteria while basal ice was dominated by Firmicutes and Proteobacteria. The bacterial communities were also substantially different in functional potential. Genes associated with functional categories of cellular processes and metabolism were significantly enriched in surface ice, while genes connected to environmental information processing were enriched in basal ice. In terms of biogeochemical cycles of carbon, nitrogen, phosphorus, and sulfur, bacterial communities in surface ice were enriched for genes connected to aerobic carbon fixation, aerobic respiration, denitrification, nitrogen assimilation, nitrogen mineralization, sulfur mineralization, alkaline phosphatase, and polyphosphate kinase. In contrast, bacterial communities in basal ice were enriched for genes involved in anaerobic carbon fixation, fermentation, nitrate reduction, 2-aminoethylphosphonic acid pathway, G3P transporter, glycerophosphodiester phosphodiesterase, and exopolyphosphatase. Structural equation modeling showed that total nitrogen and environmental carbon:phosphorus were positively while environmental nitrogen:phosphorus was negatively associated with taxonomic β-diversity which itself was strongly associated with functional β-diversity of bacterial communities. Conclusions This study furthers our understanding of biogeochemical cycling of the mountain cryosphere by revealing the genetic potential of the bacterial communities in surface and basal ice at the glacier terminus, providing new insights into glacial ecology as well as the influences of glacier retreat on downstream systems.