The invention discloses a compound pickling corrosion inhibitor of jatropha curcas cake extract and a preparation method thereof, which belong to the technical field of corrosion inhibitors. The present invention optimizes the process of extracting acid corrosion inhibitor from jatropha curcas cake, removes toxic protein and phorbol ester, overcomes the problem that the acid corrosion inhibitor extracted from jatropha curcas cake is toxic, and uses pomelo peel extract and leprosy The tree cake extract has a synergistic effect, high corrosion inhibition efficiency, strong adaptability, and obviously inhibits the corrosion effect of acid on steel and aluminum materials, and more importantly, it has a good corrosion inhibition effect on zinc, zinc and aluminum alloys. The corrosion inhibitor of the invention is safe, harmless, biodegradable, and easy to use, and can be applied to cleaning petrochemical equipment, boilers, and even tap water pipelines, and has good development prospects.