When the distribution of water quality samples is roughly balanced, the Bayesian criterion model of water-inrush source generally can obtain relatively accurate results of water-inrush source identification. However, it is often difficult to achieve desired classification results when training samples are imbalanced. Sample imbalance is common in the source identification of mine water-inrush. Therefore, we propose a three-dimensional (3D) spatial resampling method based on rare water quality samples, which achieves the balance of water quality samples. Based on the virtual water sample points distributed by the 3D grid, the method uses the 3D Inverse Distance Weighting (IDW) method to interpolate the groundwater ion concentration of the virtual water samples to achieve oversampling of rare water samples. Case study in Gubei Coal Mine shows that the method improves overall discriminant accuracy of the Bayesian criterion model by 5.26%, from 85.26% to 90.69%. In particular, the discriminative precision of the rare class is improved from 0% to 83.33%, which indicates that the method can improve the discriminant accuracy of the rare class to large extent. In addition, this method increases the Kappa coefficient of the model by 19.92%, from 52.26% to 72.19%, increasing the degree of consistency from “general” to “significant”. Our research is of significance to enriching and improving the theory of prevention and treatment of mine water damage.