The main purpose of this work was to examine how aquifer layering impacts the ability of subsurface dams to retain seawater intrusion (SWI) and to clean up contaminated coastal aquifers using both experimental and numerical techniques. Four different layering configurations were investigated, including a homogeneous case (case H), and three different layered cases where a low permeability layer was set at the top of the aquifer (case LH), at the middle part of the aquifer as interlayer (case HLH), and at the lower part of the aquifer (case HL). The subsurface dam was able to retain the saltwater wedge associated with a drop of the hydraulic gradient from 0.0158 down to 0.0095 in all the cases, thereby achieving up to 78% reduction in the saltwater toe length. In cases LH and HLH, the start of the saltwater spillage was delayed compared to the homogeneous case, and the time taken for the freshwater zone to be fully contaminated (post-spillage) was twice and three times longer, respectively. By contrast, the existence of a low K layer at the bottom of the aquifer (case HL) considerably weakened the ability of dams to retain the intrusion, allowing for quicker saltwater spillage past the wall. The natural cleanup of SWI-contaminated coastal aquifers was, for the first time, evidenced in heterogeneous settings. Depending on the stratification pattern, the presence of stratified layers however prolonged the cleanup time to various degrees, compared to the homogeneous scenario, particularly in case HL, where the cleanup time was nearly 50% longer.