This study investigates the evolution of superconductivity in K2-xFe4+ySe5 using temperature-dependent X-ray absorption and resonant inelastic X-ray scattering techniques. Magnetization measurements show that polycrystalline superconducting (SC) K1.9Fe4.2Se5 has a critical temperature (T c) of ∼31 K with a varying superconducting volume fraction, which strongly depends on its synthesis temperature. An increase in Fe-structural/vacancy disorder in SC samples with more Fe atoms occupying vacant 4d sites is found to be closely related to the decrease in the spin magnetic moment of Fe. Moreover, the nearest-neighbor Fe-Se bond length in SC samples exceeds that in the non-SC (NS) sample, K2Fe4Se5, which indicates a weaker hybridization between the Fe 3d and Se 4p states in SC samples. These results clearly demonstrate the correlations among the local electronic and atomic structures and the magnetic properties of K2-xFe4+ySe5 superconductors, providing deeper insight into the electron pairing mechanisms of superconductivity.