- This paper describes the established correlations between the characteristics of MgB 2 -based superconducting materials and their structural features, in particular the oxygen distribution and content. As indicated by SEM and Auger analysis, a sizeable amount of oxygen is usually present in superconducting MgB 2 -based materials (bulks, thin films, and wires). The matrix phase of bulk MgB 2 contains rather small amounts of oxygen, but contains a high amount of dispersed inclusions or areas with compositions close to MgBO. X-ray phase analysis with Rietveld refinement (using the FullProf Suite program package) of several highly dense MgB 2 -based bulk samples (with high critical current densities) showed that the superconducting phase had a composition within the range MgB 1.68 O 0.26 and MgB 1.74 O 0.32 instead of pure MgB 2 . Besides, a small amount of a phase with MgO structure was observed in the materials by X-rays as well. The calculation of the enthalpy of formation confirms the possibility of oxygen solubility in MgB 2 and shows that the formation of MgB 1.75 B 0.25 is most favorable. The results of ab initio calculations of the electronic structure and stability of the MgB 2 compounds with partial oxygen substitution for boron show that it is energetically preferable for oxygen atoms to replace boron pairwise.