Timely and accurate monitoring of soil salinity content (SSC) is essential for precise irrigation management of large-scale farmland. Uncrewed aerial vehicle (UAV) low-altitude remote sensing with high spatial and temporal resolution provides a scientific and effective technical means for SSC monitoring. Many existing soil salinity inversion models have only been tested by a single variable selection method or machine learning algorithm, and the influence of variable selection method combined with machine learning algorithm on the accuracy of soil salinity inversion remain further studied. Firstly, based on UAV multispectral remote sensing data, by extracting the spectral reflectance of each sampling point to construct 30 spectral indexes, and using the pearson correlation coefficient (PCC), gray relational analysis (GRA), variable projection importance (VIP), and support vector machine-recursive feature elimination (SVM-RFE) to screen spectral index and realize the selection of sensitive variables. Subsequently, screened and unscreened variables as model input independent variables, constructed 20 soil salinity inversion models based on the support vector machine regression (SVM), back propagation neural network (BPNN), extreme learning machine (ELM), and random forest (RF) machine learning algorithms, the aim is to explore the feasibility of different variable selection methods combined with machine learning algorithms in SSC inversion of crop-covered farmland. To evaluate the performance of the soil salinity inversion model, the determination coefficient (R2), root mean square error (RMSE) and performance deviation ratio (RPD) were used to evaluate the model performance, and determined the best variable selection method and soil salinity inversion model by taking alfalfa covered farmland in arid oasis irrigation areas of China as the research object. The variable selection combined with machine learning algorithm can significantly improve the accuracy of remote sensing inversion of soil salinity. The performance of the models has been improved markedly using the four variable selection methods, and the applicability varied among the four methods, the GRA variable selection method is suitable for SVM, BPNN, and ELM modeling, while the PCC method is suitable for RF modeling. The GRA-SVM is the best soil salinity inversion model in alfalfa cover farmland, with Rv 2 of 0.8888, RMSEv of 0.1780, and RPD of 1.8115 based on the model verification dataset, and the spatial distribution map of soil salinity can truly reflect the degree of soil salinization in the study area. Based on our findings, the variable selection combined with machine learning algorithm is an effective method to improve the accuracy of soil salinity remote sensing inversion, which provides a new approach for timely and accurate acquisition of crops covered farmland soil salinity information.