We present the first spatially resolved, X-ray spectroscopic study of the 4−8 keV diffuse emission found in the central part of the nearby starburst galaxy M 82 on a few arcsecond scales. The new details that we see allow a number of important conclusions to be drawn on the nature of the hot gas and its origin as well as feedback on the interstellar medium. We use archival data from the Chandra X-ray Observatory with an exposure time of 570 ks. The Fe XXV emission at 6.7 keV, expected from metal-enriched hot gas, is enhanced only in a limited area close to the starburst disc and is weak or almost absent over the rest of the diffuse emission, resulting in spatial variations in equivalent width from < 0.1 keV to 1.9 keV. This shows the presence of non-thermal emission due to inverse Compton scattering of the far-infrared photons by radio emitting cosmic ray electrons. The morphological resemblance between the diffuse X-ray, radio, and far-infrared emission maps support this concept. Our decomposition of the diffuse emission spectrum indicates that ∼70% of the 4−8 keV luminosity originates from the inverse Compton emission. The metal-rich hot gas with a temperature of ≃5 keV makes a minor contribution to the 4−8 keV continuum, but it accounts for the majority of the observed Fe XXV line. This hot gas appears to emerge from the circumnuclear starburst ring and fill the galactic chimneys identified as mid-infrared and radio emission voids. The energetics argument suggests that much of the supernova energy in the starburst site has gone into creating of the chimneys and is transported to the halo. We argue that a hot, rarefied environment produced by strong supernova feedback results in displacing the brightest X-ray and radio supernova remnants which are instead found to reside in giant molecular clouds. We find a faint X-ray source with a radio counterpart, close to the kinematic centre of the galaxy and we carefully examine the possibility that this source is a low-luminosity active galactic nucleus in an advection-dominated accretion flow phase