Scanning near-field microwave microscopy is a versatile tool to image the surface of materials, with sub-wavelength spatial resolution, in terms of the impedance at microwave frequencies. The microscopic impedance spectroscopy gives the nature of the surface in terms of the dielectric and magnetic properties. The retrieval of the dielectric and magnetic properties depends on the stand-off distance between the near-field microwave source emanating from the electrically small monopole antenna and the surface of the sample. To maintain the stand-off distance, a novel phase based feedback control is proposed and implemented in a flexure scanning stage. This paper presents the enhancement of the images obtained using this feedback mechanism. © 2019 The authors and IOS Press. All rights reserved.