The ecological security of water resources contributes to the wellbeing of human lives and sustainable development of the social economy. Taking Anhui Province as an example, a comprehensive evaluation index system for the ecological security of water resources was constructed with TQR (threat quality regulation) as the conceptual model, and the entropy weight method was used to weight and calculate the ecological security indexes from 2013 to 2018, in order to evaluate the ecological security level of this area. Then, the obstacle degree model and gray prediction model were adopted for the obstacle factor diagnosis and safety dynamic warning. The research results show that the ecological security level of Anhui Province’s water resources is steadily increasing, from “unsafe” to “quasi safe”. The quality subsystem has the greatest impact on the ecological security of Anhui Province’s water resources and the main obstacle factors are the water quality compliance rate of drinking water source and sewage discharge per capita. The ecological security situation of Anhui Province’s water resources has changed from “critical” to “slight” and will remain “no warning” for the next five years.