In this article, a novel refractive index sensor composed of a metal–insulator–metal (MIM) waveguide with two rectangular stubs coupled with an elliptical ring resonator is proposed, the geometric parameters of which are controlled at a few hundreds of nanometer size. The transmission feature of the structure was studied by the finite element method based on electronic design automation (EDA) software COMSOL Multiphysics 5.4 (Stockholm, Sweden). The rectangular stub resonator can be thought of as a Fabry–Perot (FP) cavity, which can facilitate the Fano resonance. The simulation results reveal that the structure has a symmetric Lorentzian resonance, as well as an ultrasharp and asymmetrical Fano resonance. By adjusting the geometrical parameters, the sensitivity and figure of merit (FOM) of the structure can be optimized flexibly. After adjustments and optimization, the maximum sensitivity can reach up to 1550 nm/RIU (nanometer/Refractive Index Unit) and its FOM is 43.05. This structure presented in this article also has a promising application in highly integrated medical optical sensors to detect the concentration of hemoglobin and monitor body health.