This research aimed at studying the optimization of cocoa pod-Ficus exasperate (CP-FE) extract preparation as mild steel anticorrosive agent in hydrochloric acid solution using a central composite design as an optimization tool. The maximum inhibition efficiency of 95.42% was obtained at ethanol volume, extraction time, CP-FE mixing ratio, and CP-FE mass of 500 mL, 48 h, 5, and 100 g respectively. The coefficient of determination value of 0.9674 between experimental and predicted values suggested that the model developed was exact. The optimum predicted point for CP-FE extract preparation by CCD was 62.02 mL, 9.51 h, 3.42, and 75.68 g for the ethanol volume, extraction time, CP-FE mixing ratio, and CP-FE mass respectively. SEM images revealed an acid attack on the mild steel surface. Adsorption of CP-FE extracts on mild steel surface prevents acid attack. FT-IR revealed the presence of carboxyl (-COOH) and hydroxyl (-OH) functional groups. EDS revealed high iron composition on mild steel surfaces in the presence of CP-FE extracts. Loss of Fe2+ into free HCl solution was observed from the AAS result. Conclusively, mixed cocoa pod-Ficus exasperate extracts exhibited effective corrosion inhibitory attributes for mild steel in HCl solution.