This study investigated the corrosion inhibition potential of ionic liquid compounds using a QSPR-based machine learning predictive model combined with DFT calculations. The Gradient Boosting (GB) model was identified as the most effective predictor, demonstrating excellent accuracy with a high R² value of 0.98. Additionally, the model exhibited low RMSE (0.95), MAE (0.84), and MAD (0.94) values. The predicted corrosion inhibition efficiencies (CIE) for three new ionic liquid compounds (IL1, IL2, and IL3) were 88.95, 90.82, and 93.16, respectively, which aligned well with experimental data. By integrating DFT simulations into the data updating process, facilitated by machine learning, the approach proved invaluable for identifying new corrosion inhibitors. This work highlighted the continuous refinement of data related to the corrosion inhibition effects of ionic liquid compounds.