Wellbore integrity management for oil and gas wells plays a vital role throughout the typical lifespan of a well. Downhole casing leaks in oil- and gas-producing wells significantly affect their shallow water horizon, the environment, and fresh water resources. Additionally, downhole casing leaks may cause seepage of toxic gases to fresh water zones and the surface, through the casing annuli. Forecasting of such leaks and proactive measures of prevention will help eliminate their consequences and, in turn, better protect the environment. The objective of this study is to formulate an effective, robust, and accurate model for predicting the corrosion rate of metal casing string using artificial intelligence (AI) techniques. The input parameters used to train AI models include casing leaks, the percentage of metal loss, casing age, and average remaining barrier ratio (ARBR). The target parameter is the corrosion rate of the metal casing string. The dataset from which the AI models were trained was comprised of 250 data points collected from 218 wells in a giant carbonate reservoir that covered a wide range of practically reasonable values. Two AI tools were used: artificial neural networks (ANNs) and adaptive network-based fuzzy inference systems (ANFISs). A prediction comparison was made between these two tools. Based on the minimum average absolute percentage error (AAPE) and the highest coefficient of determination (R2) between the measured and predicted corrosion rate values, the ANN model proposed here was determined to be best for predicting the corrosion rate. An ANN-based empirical model is also presented in this study. The proposed model is based on the associated weights and biases. After evaluating the new ANN equation using an unseen validation dataset, it was concluded that the ANN equation was able to make predictions with a significantly lower AAPE and higher R2. Use of the proposed new equation is very cost-effective in terms of reducing the number of sequential surveys and experiments conducted. The proposed equation can be utilized without an AI engine. The developed model and empirical correlation are very promising and can serve as a handy tool for corrosion engineers seeking to determine the corrosion rate without training an AI model.