The work proposed a novel model to accurately trace the pollution sources of water pollution incidents based on moth-flame optimization and Metropolis-Hastings sampling algorithms. The model first utilized moth-flame optimization to estimate the parameters of the pollutant migration-diffusion model by minimizing the error between monitored and predicted concentration. It then traced the optimal pollution source location, discharge volume, and time using the M-H sampling algorithm. Simulation experiments demonstrated the model achieved significantly lower errors in tracing pollution source information compared to a previous method, with relative errors within 1.33%. The new model provides an accurate and efficient approach to tracing water pollution incidents and overcomes the limitations of previous methods. It exhibits substantial potential in identifying pollution sources within real-world aquatic environments as well as facilitating prompt responses to mitigate environmental and health impacts.