We have studied local magnetic moment and electronic phase separation in superconducting K$_{x}$Fe$_{2-y}$Se$_2$ by x-ray emission and absorption spectroscopy. Detailed temperature dependent measurements at the Fe K-edge have revealed coexisting electronic phases and their correlation with the transport properties. By cooling down, the local magnetic moment of Fe shows a sharp drop across the superconducting transition temperature (T$_c$) and the coexisting phases exchange spectral weights with the low spin state gaining intensity at the expense of the higher spin state. After annealing the sample across the iron-vacancy order temperature, the system does not recover the initial state and the spectral weight anomaly at T$_c$ as well as superconductivity disappear. The results clearly underline that the coexistence of the low spin and high spin phases and the transitions between them provide unusual magnetic fluctuations and have a fundamental role in the superconducting mechanism of electronically inhomogeneous K$_{x}$Fe$_{2-y}$Se$_2$ system.