Exchange of water between land and sea impacts fresh groundwater resources, nearshore aquatic ecosystems, and the chemistry of the ocean over geologic time. Theoretical salinity distributions in coastal aquifers based on homogeneous aquifer properties consist of a freshwater-saltwater interface that extends landward from the coastline. and a distribution of groundwater discharge across the land-sea boundary that decreases rapidly with distance offshore. However, observations indicate that both freshened groundwater and high rates of submarine groundwater discharge can exist far offshore. While it is known that heterogeneity in aquifer properties affects both salinity and submarine groundwater discharge (SGD), few studies incorporate geologic structure explicitly. Objectives. We addressed this difference between theory and observation by simulating groundwater-seawater interaction in heterogeneous continental shelf aquifers. Design and Methodology. We simulated groundwater flow in heterogeneous coastal aquifers to demonstrate that the independent observations of offshore freshwater and SGD are linked, and can be explained by interactions between geologic structure and variable-density flow and transport. We developed a geostatistical model of coastal heterogeneity using lithologic logs from the Bengal Delta, and extended it to encompass geologic connectivity likely typical along the land-sea margin. Original Data and Results. Results show that heterogeneity results in spatially complex salinity distributions that extend tens of km offshore. The density gradients that result drive high rates of circulation of sea water through the continental shelf. These processes are highly variable, but are affected by the land-sea connectivity of high- and low-permeability sediments. Further, homogeneous models with equivalent, upscaled hydraulic conductivity cannot produce patterns in salinity and SGD that are consistent with observations. Conclusion. These findings suggest that freshened groundwater resources and large solute fluxes are common characteristics of continental shelves worldwide. These new insights may alter estimates of ocean chemical budgets and improve our ability to manage coastal water resources.