Topological semimetals have aroused great research interest due to their intrinsic topological physics and potential applications in devices. A key feature for all topological materials is the so-called bulk-boundary correspondence, which means that if there is non-trivial band topology in the bulk, then we can expect unique topologically protected conducting states in the surface, i.e. the topological surface state (TSS). Previously, the studies of the surface states of topological materials mainly focused on the pristine surfaces, while the topological nodal line semimetal surface states with adsorbates are rarely systematically studied. In this paper, the topological properties of the topological semimetal AlB
2are studied by first-principles calculations, and the TSS position is calculated by constructing the Al- and B-terminated slab models. Observing the topological surface state, it is found that the drumhead-like TSS connects two Dirac nodes with no energy gaps on the node line, and the TSS of the Al end-terminated slab has a smaller energy dispersion than that of the B-terminated slab. The adsorption characteristics of AlB
2(010) surface are studied, and it is found that the Gibbs free energy (
$ {\Delta }{G}_{{{\mathrm{H}}}^{*}} $
) for hydrogen adsorption on the surface of Al is only –0.031 eV, demonstrating excellent hydrogen evolution reaction (HER) performance. The changes of TSS after H, OH and H
2O are adsorbed on the surface of AlB
2in aqueous solution environment are observed. The TSS change is the most significant when H is adsorbed, followed by OH adsorption. And the influence of H
2O on TSS due to its electrical neutrality and weak surface adsorption is very weak. Before and after adsorption, because the topology protection TSS still exists, only the energy changes, which confirms its robustness in the environment. The results of this work provide a systematic understanding of the effects of different adsorbents on the TSS of AlB
2, paving the way for future theoretical and experimental research in related fields, and alsopresent theoretical support for putting the topological materials into practical applications .