Recently, the influence of subsurface dams on solute transport in coastal aquifers has become a hot research topic. Although many studies have been conducted, the combined effects of subsurface dam and tides on variable-density solute transport remain unclear, and this study aimed to fill this research gap. In the current study, a numerical model representing a 2-D cross-shore coastal aquifer was established. The model simulated cases with and without a subsurface dam, and sensitivity analysis cases with different height and location of the subsurface dam and solute concentration. The results show that a subsurface dam blocks a portion of the solute plume, which can only be discharged by dilution at the edges, thereby altering its discharge pattern and reducing their discharge rate. The addition of a subsurface dam may either prolong or shorten the residence time of solute,depending on the location rather than the height of the subsurface dam. In particular, a more landward subsurface dam would significantly increase the residence time; sensitivity analysis demonstrates that both the landward shift and the height increase of the subsurface dam contribute to a heightened ratio of dynamic mass distribution for the solute plume within the freshwater and saltwater zones of the aquifer, with maximum changes in mass distribution ratios of 87.22% and 300%, respectively. Also, these factors cause the solute to migrate both seaward and landward, respectively, across the primary outflow regions of the aquifer-ocean interface. Results from this study may provide theoretical guidance for the optimal design and environmental impact assessment of subsurface dams.