The effect of clay layer compression on the enrichment of groundwater fluoride remains unknown. Quaternary groundwater with high fluoride levels at the Cangzhou Plain, which has a long history of land subsidence caused by clay layer compression, poses a potential health risk. The spatial distribution and enrichment mechanisms of groundwater fluoride are identified by sample collection, hydrochemical analysis, and geochemical inverse modeling. The results revealed that fluoride concentrations in 82 % of the 122 groundwater samples above the limit in drinking water as 1.0 mg/L in China. Fluoride in shallow groundwater (depth <20 m, ∼average = 2.08 mg/L) was mainly originated from fluorite dissolution and influenced by groundwater HCO3−, pH, and cation exchange levels. Below ∼200 m, the main source of groundwater fluoride (∼average = 3.12 mg/L) was the compression−release of clay pore water with high F− concentration, which was generated by complex water-rock interaction. Based on hydrochemical inverse simulation and end-member mixing models, the pore water released from clayey sediments supplied 53 %−56 % of deep groundwater (>200 m) and contributed 2.07 −2.87 mg/L to F− concentration. The findings of this study provide a theoretical basis for future research on prevention of high fluoride groundwater induced by clayey sediment compression.