Buffalo mastitis detection and buffalo milk quality are of great importance to the world dairy industry. Somatic cell count (SCC) can be employed to assess mammary gland health and milk quality in dairy cows, but SCC detection is costly, and the detection instrument is expensive. The purpose of this study was to develop high and low SCC identification models using Fourier-transform mid-infrared spectrum (FT-MIRS), which could be used to diagnose subclinical mastitis (SCM) in buffalo and to determine the milk quality grade at a low cost. The dataset contained 899 buffalo milk samples collected from two regions in China. Firstly, the samples were divided into positive group above the threshold (SCM or unqualified milk) and negative group below the threshold (healthy or qualified milk) with SCC = 200 × 103 cells/mL (SCM in buffalo), 400 × 103 cells/mL (EU standard for raw cow milk, ES), 500 × 103 cells/mL (Indian standard for raw buffalo milk, IS), and 750 × 103 cells/mL (US standard for raw cow milk, US) as thresholds, respectively. Then, with FT-MIRS as predictive variables, predictive models were developed using Partial Least Squares Discriminant Analysis (PLSDA), Random Forest (RF), and Gradient Boosting Machine (GBM). The main results were as follows: the AUCval of the diagnostic model of SCM in buffalo using SCM criteria as a threshold was 0.84 (PLSDA). The AUCval values of the three buffalo milk quality classification models with ES, IS, and US as thresholds were 0.76 (PLSDA), 0.78 (GBM), and 0.84 (PLSDA), respectively. The predictive models established in this paper had a weak predictive ability for positive samples, and the “stepwise discriminant analysis” was recommended to improve the model application effect: The models were applied to classify samples as positive and negative, and then the samples with higher predictive probability were selected. Finally, the remaining samples were further differentiated using the reference methods of SCC detection. To conclude, FT-MIRS has the potential to predict buffalo mammary gland health status and buffalo milk quality grade, reduce the cost of SCC detection, and improve work efficiency, which will lay the foundation for rapid buffalo milk quality classification by raw milk regulatory authorities and rapid diagnosis of SCM in buffalo by farms.