Riparian zones play a vital role in the river ecosystem. Solutes in vertical riparian zones are transported being by alternating hydraulic gradients between river water and groundwater, due to natural or human activities. This study investigates the impacts of porous sediments and alternating rate of surface water-groundwater on nitrogen removal in the riparian zone through experiments based on the field sampled. The experimental results, combined with dimensionless numbers (Péclet and Damköhler) and Partial Least Squares-Path Modeling, analyze the nitrogen fate responding to hydrodynamics changes. The results show that increased sediment porosity contributes to the ammonium removal, particularly when the oxygen content of river water is low, with the removal rate up to 72.57%. High ammonium content and dissolved organic carbon (DOC) in rural rivers lead to a constant low-oxygen condition (4 mg/L) during surface water-groundwater alternation, and promote denitrification. This threatens groundwater with ammonium pollution and causes accumulation at the top of vertical riparian zones during upwelling, potentially causing secondary river pollution. However, increasing the alternating rate hinders the nitrate denitrification and drastically changes in the redox environment of the riparian zone, despite contributing to ammonium removal. Rapid oxygen consumption during aerobic metabolism and nitrification in groundwater-surface water exchange created favorable conditions for denitrification. Floodplains sediment porosity is unfavorable for nitrification. This study improves understanding of coupled hydrologic and solute processes in vertical riparian zones, informing strategies for optimizing nitrogen attenuation and riparian zone construction.