As one of the globally largest cities suffering from severe water shortage, Beijing is highly dependent on groundwater supply. Located northeast of Beijing, the Pinggu district is an important emergency-groundwater-supply source. This area developed rapidly under the strategy of the integrated development of the Beijing-Tianjin-Hebei region in recent years. It is now important to evaluate the spatiotemporal variations in groundwater quality. This study analyzed groundwater-chemical-monitoring data from the periods 2014 and 2017. Hydrogeochemical analysis showed that groundwater is affected by calcite, dolomite, and silicate weathering. Self-organizing map (SOM) was used to cluster sample sites and identify possible sources of groundwater contamination. Sample sites were grouped into four clusters that explained the different pollution sources: sources of industrial and agricultural activities (Cluster I), landfill sources (Cluster II), domestic-sewage-discharge sources (Cluster III), and groundwater in Cluster IV was less affected by anthropogenic activities. Compared to 2014, concentrations of pollution indicators such as Cl-, SO42-, NO3-, and NH4+ increased, and the area of groundwater affected by domestic sewage discharge increased in 2017. Therefore, action should be taken in order to prevent the continuous deterioration of groundwater quality.