Water quality prediction is an important research focus in smart water and can provide the support to control and reduce water pollution. However, existing water quality prediction models are mainly data-driven and only rely on various sensor data. This paper proposes a new water quality prediction modeling approach integrating data and knowledge. We develop a water quality prediction framework that combines knowledge graph and deep adversarial networks. The knowledge extraction and management compound extracts the water quality knowledge graph from different knowledge sources by using the deep adversarial joint model. The fusing parameter importance learning compound calculates the contribution of parameters in water quality prediction by taking into account both knowledge and data levels of correlation. Finally, a water quality prediction model combining weighted CNN-LSTM with adversarial learning predicts the values of total nitrogen based on real-time monitoring data. The experimental results on monitoring data from the Juhe River of China show that the proposed model can greatly improve the effect of water quality prediction.