Superconducting MgB 2 ceramics were prepared and yield superconducting transition temperatures of about 39 K. For covering the various length scales on which inhomogeneities appear in MgB 2 , electron-probe micro-analysis (EPMA) and analytical transmission electron microscopy (TEM) were applied for a phase analysis. Particularly useful were the preliminary electron spectroscopic imaging (ESI) results in the TEM. It could be shown by EPMA that the microstructure consists of a Mg-B-O matrix and boron-rich secondary phases of composition ~MgB 1 2 . It was unclear in which form oxygen was present in the superconducting matrix. By combining the acquisition of B-K and O-K edge jump ratio images and energy-dispersive X-ray spectroscopy in the TEM, we could prove that the matrix consists of superconducting MgB 2 and MgO. Most of the MgO precipitates and grains appear with diameters between 20 and 300 nm. The size distribution of MgO was inhomogeneous and oxygen-rich areas of dimensions >1 μm were also observed. Edge jump ratio images obtained by ESI were analysed for determining the signal values and effects of multiple inelastic scattering.