The traditional methods for identifying water sources in coal mines lack the ability to quickly detect water sources and are prone to causing secondary pollution of samples. In contrast, laser induced fluorescence (LIF) technology has been introduced for the identification of coal mine water sources due to its high sensitivity and real-time performance. However, extreme learning machine (ELM) have shortcomings in randomly selecting weights and biases. The Beluga Whale Optimization (BWO) algorithm has efficient optimization capability, global search capability, adaptability and parallelism, and can find the optimal weights and biases in a short time. The combination of LIF technology and BWO-ELM model can be applied to quickly identify the welling water source in coal mine. Select sandstone water and old goaf water from the Huainan mining area as experimental samples, and mix them in different proportions to prepare 7 mixed water samples for testing. Utilize LIF technology to obtain spectral curve images, preprocess them with polynomial smoothing algorithm (SG) and spectral multiple scattering correction (MSC), and perform dimensionality reduction using factor analysis (FA) and linear discriminant analysis (LDA) methods. Finally, construct ELM models, Long Short Term Memory (LSTM) models, BWO-ELM models, and Particle Swarm Optimization Extreme Learning Machine(PSO-ELM) models for the dimensionality reduced data. In order to improve the reliability and accuracy of the results, the experimental results were kept to 5 decimal places. From the experimental results, it can be seen that SG-LDA-BWO-ELM has the best fitting effect, with a fitting coefficient of 0.99990, a root mean square error of 0.00041, a mean square error approaching 0, and an average absolute error of 0.00021. It has the best convergence and the smallest absolute error among all models, making it the most suitable for identifying mine water inrush. It is of great significance for preventing and controlling mine water disasters and ensuring coal mine production safety.