In this work, Myrmecodia pendans, or sarang semut, was successfully extracted as a potential organic inhibitor. Various concentrations of Myrmecodia pendans extract in 1 M H2SO4 solution were applied in the range of 100–500 mg/L for corrosion inhibition. Gas chromatography–mass spectroscopy (GC-MS) showed that the Myrmecodia pendans extracts contained a high-benzenediol compound with rich oxygen atom content, which played an important role in the inhibition process. The 300 mg/L Myrmecodia pendans extract had the highest effect, decreasing the rate of corrosion from 177.73 mpy to 47.4 mpy. This was attributed to the chemical compounds present in the Myrmecodia pendans extract on the surface of mild steel, which prohibited the corrosion rate.