Co-MOF based metal organic framework was synthesized by reacting a metal ion (cobalt nitrate hexahydrate) with an organic ligand (2-methylimidazole) via a wet chemical method. The resulting material was characterized using detailed analytical methods and further was used as a self-assembly corrosion inhibitor in sweet corrosive environment. The empirical data set via electrochemical studies was modeled using adaptive neuro fuzzy inference system (ANFIS). The observed results showed that Co-MOF could significantly impede the corrosion rate of X65 steel and protect it from CO 2 corrosion. Increasing the concentration of Co-MOF in the test solution increased the inhibition efficiency up to 97% at 0.1 wt % Co-MOF with a mixed-type inhibition mechanism. In addition, the DFT/MD-simulation approach evidenced the adsorption disposition of Co-MOF in aqueous and gas phase which complement with the empirical findings. Also, the prognostic capability of the proposed algorithm based on the statistical parameters such as root-mean-square error (RMSE), chi square (χ 2 ), model predictive error (MPE) and coefficient of determination (R 2 ) were appraised. From the viewpoint of statistics, the explanatory model aligned credibly with the ANFIS algorithm. The overall findings confirmed a dense hybrid coating of the synthesized Co-MOF on X65 steel as responsible for the inhibition of the sweet corrosion.