This study developed an ensemble Bayesian Neural Network (BNN) model for pipeline corrosion prediction incorporating uncertainty analysis. The performance of the proposed BNN model was compared with different empirical and data-driven models. Shapley Additive Explanation (SHAP) values were used to quantify the importance of input factors. Results indicate that the ensemble BNN model demonstrates superior prediction accuracy, achieving the highest R2 value of 0.949, with the lowest Mean Absolute Error (MAE) of 0.33mm and Root Mean Square Error (RMSE) of 0.449mm on corrosion depth. It outperforms other models in predicting maximum corrosion depth and uniquely captures uncertainty information, which deterministic models cannot provide. Key factors influencing corrosion include chloride content, pH, pipe-to-soil potential, and pipeline age. Specifically, conditions such as a pipe-to-soil potential exceeding -0.85V, a pipeline age over 20 years, and pH values below 7 are found to significantly accelerate corrosion. The model also illustrates the effects of different influencing factors on corrosion growth uncertainty. Higher chloride content, lower pH values, and higher pipe-to-soil potentials may expand the uncertainty bounds. The proposed model presents the dynamic changes in prediction uncertainty over time, which is usually ignored in previous models. It can improve the precision and reliability of long-term predictions concerning pipeline corrosion depth. This knowledge of corrosion uncertainty is crucial for making informed decisions about pipeline inspection and maintenance strategies.