Due to its chemical specificity, the near edge X-ray absorption fine structure spectroscopy is an interesting technique to study the changes in hybrid organic-inorganic photoresists. In this work, we analyzed the chemical changes occurring in photoresists synthesized from organically modified precursors and transition metal alkoxides by sol-gel route. These systems are nonchemically amplified resists for ultraviolet, extreme ultraviolet, and electron beam lithography. They are based on Si, Zr, and Ti oxides or a combination of these. The experiments were conducted at the PolLux beamline of the Swiss Light Source, by a scanning transmission X-ray microscopy, which combines the spatially-resolved microscopy and fine structure spectroscopy at once. The absorption spectra were collected in the energy range of the carbon edge (≈ 290 eV) before and after in situ exposure of the photoresists to 500 eV photons. The variations in peak intensity after exposure reveal the changes in the chemical environment of carbon and the chemical configuration of the organic ligands, regardless of the inorganic part. It was found that the photon exposure induced sizable photodegradation or photopolymerization of organic groups (phenyl or methyl methacrylate, respectively). These mechanisms contribute to the foundation for the exposure reaction in negative-tone hybrid photoresists. Interestingly, it was also found that the detachment of the phenyl ligand occurs in a variety of possible pathways to condensation. We believe that our results and approach can provide a better understanding of photochemistry of resists, in particular for extreme ultraviolet lithography.