This paper studies environment correction algorithm in the minimum deviation angle method for refractive index measuring. The principle equation of minimum deviation angle method, based on the refractive index of air and the absolute refractive index of glass specimens is derived. The environmental factors are analyzed which may affect the measurement results in the process of actual measurement. According to thermal characteristics equations of glass, absolute index of refraction of glass for certain material is related to temperature. According to the Edlén equation, refractive index of air is related to temperature, pressure, humidity and so on. Sometimes, the environmental factors are uncontrollable, refractive index will change over the environmental factors, including temperature, pressure and humidity. The correction algorithm of refractive index which modified the measurement results from the non-standard environmental conditions to standard conditions is perfected. It improves the correction accuracy. Taking H-ZK9B for example, the impact of environmental factors on the refractive index is analyzed adopting controlling variable method. The need for environmental factors correction in different accuracy requirements is given. To verify the correction method, two sets of measured refractive index data of the same glass are corrected which measured under different environmental factors. The difference between the two sets of data is less than 1×10-6 with the correction.