Self-action nonlinearity is a key aspect–either as a foundational element or a detrimental factor–of several optical spectroscopies and photonic devices. Supercontinuum generation, wavelength converters, and chirped pulse amplification are just a few examples. The recent advent of Free Electron Lasers (FEL) fostered building on nonlinearity to propose new concepts and extend optical wavelengths paradigms for extreme ultraviolet (EUV) and X-ray regimes. No evidence for intrapulse dynamics, however, has been reported at such short wavelengths, where the light-matter interactions are ruled by the sharp absorption edges of core electrons. Here, we provide experimental evidence for self-phase modulation of femtosecond FEL pulses, which we exploit for fine self-driven spectral tunability by interaction with sub-micrometric foils of selected monoatomic materials. Moving the pulse wavelength across the absorption edge, the spectral profile changes from a non-linear spectral blue-shift to a red-shifted broadening. These findings are rationalized accounting for ultrafast ionization and delayed thermal response of highly excited electrons above and below threshold, respectively.