A high sensitivity refractive index sensor have been proposed in this paper, which is composed by an M-shaped resonant cavity coupled with a baffle contained Metal-Dielectric-Metal (MDM) waveguide. The influence of structural parameter of M-shaped cavity and filled medium characteristics inside it on the transmission spectrum of MDM waveguide have been analyzed numerically through the finite element method. Simulation results show that four asymmetric transmission peaks with Fano line-shape are generated by the coupling interference between the four quasi Fabry-Perot (FP) resonant modes of the first to fourth orders inside M-shaped cavity and the reflected wave in MDM waveguide, moreover the four peak wavelengths redshift almost linearly with increasing cavity length or the refractive index of the filled medium, which can be used to design the refractive index sensor. The calculated sensitivities associated with the quadruple Fano transmission peaks are found to be proportional to the cavity length and the reciprocal of resonant order. As a consequence, a sensitive up to 4 900 nm/RIU has been realized by an M-shaped resonator in dimensions of 400 nm×400 nm. The results in the article provide an effective guidance for the design of high sensitivity sensors.