Salinity and selenium concentrations in shallow groundwater of the western San Joaquin Valley, California, are related to the geomorphology and hydrology of the alluvial fans. The highest salinity and selenium concentrations in shallow groundwater occur in alluvium deposited by ephemeral streams and at the margins of the major alluvial fans, where there were naturally saline, fine-grained soils. Low-to-moderate salinity and selenium concentrations in shallow groundwater are associated with upper and middle areas of the major alluvial fans deposited by intermittent streams. Areas with the most naturally saline soils have been irrigated in the last 40 years. These are now the areas of highest salinity and selenium concentrations in the shallow groundwater. Present-day (1986) groundwater salinity is spatially correlated with natural soil salinity in these areas. Isotopic data indicate that the highest salinity and selenium concentrations in groundwater present at low altitudes resulted from evaporative concentration when the water table was shallow.