Abstract Metasurface provides a novel way to modulate light energy at specific wavelengths, namely resonances, where there is a sharp drop in the transmission spectrum. Based on the relationship between the resonant position and the environmental condition, various refractive index detection methods have been developed. However, the resonance spectrum is strongly affected by the environmental and instrumental fluctuations, and current researches usually focus on the improvement of a single sensing performance metric, such as the Q factor, sensitivity, detection range, etc. In this work, we proposed an all-dielectric metasurface for environmental refractive index sensing based on quasi-BIC with an enhanced stability, simultaneously taken into account an enlarged detection range, a high Q factor and a relatively high sensitivity. With this designed metasurface, dual-resonance sensing is realized because the interval between the two resonance peaks in the transmission spectrum decreases near linearly with the environmental refractive index. We experimentally demonstrated that compared to traditional single-resonance sensing, the errors caused by environmental and instrumental fluctuations can be minimized, and the stability can be improved. This metasurface has great potential for applications such as refractive index sensing, concentration detection, biomacromolecule identification, and cancerous cell screening.