The microscopic pore structure of sandstone gradually changes under long-term immersion, resulting in dynamic changes in the mechanical and damage properties of sandstone, which brings challenges to maintain the long-term stability of underground engineering. In this paper, the evolution of pore structure and mechanical behavior of sandstones at different immersion times (0d, 3d, 30d, 90d, 180d and 360d) is studied. A series of physico-chemical experiments and uniaxial compression tests (with simultaneous acquisition of acoustic emission (AE) signals) are conducted to explore the weakening mechanism and failure mode of sandstones during long-term immersion. The results show that long-term immersion has a significant effect on the pore structure and mechanical behavior of sandstones. Various physical parameters indicate that the change in the pore structure of a sandstone with increasing immersion time can be divided into two stages, namely the swelling stage of clay minerals (saturation process) and the corrosion stage of potassium feldspar (long-term immersion process). The variation of pH value and K+ concentration in soaking solution can provide a basis for the division of pore structure stages. From the perspective of mechanical behavior, the uniaxial compressive strength (UCS) and cumulative AE counts of a sandstone decrease by 83% and 96.8% respectively after 360 d of immersion, with enhanced plastic characteristics. The macroscopic failure mode of a sandstone changes from combination of shear and tensile crack surfaces to a single shear crack surface. Based on the results of physico-chemical experiments and mechanical tests, it can be assumed that microcracks in long-term immersion sandstones are more prone to develop along weakened cementation surfaces. Under the effect of stress, corrosion pores formed by potassium feldspar provide space for the rotation and movement of quartz grains, making it more prone to shear slip. The study results enhance our understanding of weakening mechanisms at long-term immersion and provide a basis for assessing the long-term stability of underground engineering.