Lignin has been recognized as a major factor contributing to lignocellulosic recalcitrance in biofuel production and attracted attentions as a high-value product in the biorefinery field. As the traditional wet chemical methods for detecting lignin content are labor-intensive, time-consuming and environment-toxic, it is an urgent need to develop high-throughput and environment-friendly techniques for large-scale crop germplasms screening. In this study, we conducted a Fourier transform infrared (FTIR) assay on 150 maize germplasms with a diverse lignin composition to build predictive models for lignin content in maize stalk. Principal component analysis (PCA) was applied to the FTIR spectra for use as model inputs. Classification and advanced gradient boosting machine (GBM) algorithms demonstrated higher predictive accuracy (0.82–0.96) compared to traditional linear and regularization algorithms (0.03–0.04) in the training set. Notably, two optimal models, built using the extreme gradient boosting (XGBoost) and light gradient boosting machine (LightGBM) algorithms, achieved R2 values of over 0.91 in the training set and over 0.82 in the test set. Overall, the combination of FTIR and machine learning (ML) algorithms offers a high-throughput and efficient method for predicting lignin content. This approach holds significant potential for genetic breeding and the effective utilization of maize in industrial production.