Streamflow prediction is a fundamental task serving for flood prevention and efficient water resource management. Deep learning-based methods have emerged as the dominant approach and have made remarkable progress in the task. However, these methods ignore the hydrological constraints on streamflow, such as water delay time and streamflow direction, resulting in inaccurate prediction. To address this problem, this study incorporates hydrological constraints with deep learning models to improve streamflow prediction, and develops a hydrological constrained graph convolutional network (HCGCN) model. Specifically, the model designs a time-delayed spatiotemporal directed graph to present the spatiotemporal relationships and hydrological constraints, and develops a hydrological feature aggregation module to adaptively learn the complex spatiotemporal dependencies. In addition, HCGCN proposes a streamflow prediction neural network to predict streamflow by stacking the feature aggregation modules. Experimental results show that HCGCN significantly improves the prediction accuracy in a real streamflow prediction task. This study provides an exploration of introducing hydrological constraints to improve streamflow prediction, and provides a new reference for various hydrological prediction tasks.