Corrosion is one of the major threats to the safety and reliability of oil and gas pipelines, making accurate prediction of corrosion rate crucial for pipeline maintenance and repairment. Traditional prediction methods often ignore more critical factors and lack interpretability, which hinders the practical application. Here, an interpretable ensemble machine learning framework is proposed, not only improving prediction performance, but also enhancing interpretability for predicting the internal corrosion rate of oil and gas pipelines. In this work, ExtraTreeRegression model has demonstrated superior prediction accuracy relative to the other five machine learning models, and the determination coefficient of the ExtraTreeRegression model achieves 0.93 after feature engineering. Then, Shapley Additive exPlanations (SHAP) values is utilized to visually interpret the model locally and globally to help account for the contributions of the input features. Furthermore, the accumulated local effect (ALE) successfully explains how the features affect the internal corrosion rate of oil and gas pipelines. By collecting corrosion data of oil and gas pipeline and performing feature engineering and data preprocessing, we construct a comprehensive and reliable prediction model with interpretability. Experimental results demonstrate that the proposed interpretable ensemble machine learning approach outperforms other models in both accuracy and interpretability, providing valuable insights for pipeline management decisions.