Mine water inrush disaster seriously threatens the production of coal mine. Rapid and accurate identification of mine water inrush sources is a key premise for mine water disaster prevention. The conventional research on the identification of water inrush source has focused on a single source, and the identification of mixed water samples from multi-source aquifers in deep coal mining environment is not yet fully explored. In this study, absorption spectrum technology was introduced into the identification of water inrush sources. The absorption spectra of the water samples with different mixing ratios were prepared using the ultraviolet and visible spectrophotometry (UV–Vis) spectrophotometer. In addition, spectral data preprocessing such as scattering correction, baseline correction, smoothing and denoising, and data enhancement were conducted to reduce the influence of experimental error, environment, radiation, molecular interaction, and other factors on the spectral data. Furthermore, a genetic algorithm (GA) was used to improve the seven parameters of the extreme gradient boosting (XGBoost) algorithm, such as learning rate, base model selection, tree parameters, regularization parameters, and iteration times. The deep-learning classifier of mine mixed water sources based on GA-XGBoost was established and used to identify 66 groups of mixed water sources in the Huangyuchuan Mine. The simulation results show that spectral preprocessing and normalization enhancement effectively improved the accuracy of the discriminant model. After 100 cross-validations, the average recognition accuracy of the GA-XGBoost model was 94%, and the results were accurate and reliable. This study provides a new direction and method for the identification of water inrush sources, particularly for mixed water inrush sources. It may also serve as a technical reference for decision-makers to formulate effective coal mine water inrush prevention and control programs and for mine water disaster prevention in similar coalfields in North China.