For the first time, fluorine K-edge X-ray absorption near-edge structure (XANES) spectroscopy was applied to detect per- and polyfluoroalkyl substances (PFAS) in various soil and sewage sludge samples. The method can be used to determine the speciation of inorganic and organic fluorides, without pre-treatment of solid samples. Therefore, XANES spectra of several inorganic fluorides as well as selected fluorinated organic compounds were recorded. While inorganic fluorides partially exhibit a variety of sharp spectral features in the XANES spectrum, almost all inspected organofluorine compounds show two distinct broad features at 688.5 and 692.0 eV. Moreover, the peak intensity ratio 688.5 eV/692.0 eV in the PFAS XANES spectrum can be inversely correlated to the chain length of the perfluoro sulfonic acid group. The detection of targeted PFAS by bulk-XANES spectroscopy in combination with linear combination fitting in soils and sewage sludges was not applicable due to the low organic fluorine to total fluorine ratio of the samples (0.01–1.84%). Nonetheless, direct analysis of pure PFAS revealed that analysis of organofluorine species might be achieved in higher concentrated samples. Furthermore, quantitative measurements by combustion ion chromatography (CIC) evaluated as sum parameters extractable organically bound fluorine (EOF) and total fluorine (TF) emphasize that besides soils, sewage sludges are a significant source of organic fluorine in agriculture (154–7209 µg/kg).