In this paper, the corrosion inhibition performance of [C16DMIM] [PF6] ionic liquid on mild steel in 1M H2SO4 environment and the corrosion inhibition performance and mechanism of [C16DMIM] [PF6] compounded with KI, thiourea and formaldehyde, respectively, were investigated based on serious corrosion hazards of metal pickling. The inhibition ability of [C16DMIM] [PF6] was evaluated by static weight loss method, electrochemical corrosion testing and microscopic morphological analysis, while the synergistic effect of the ionic liquid compounded with KI, thiourea and formaldehyde was explored by experiments and quantum chemical calculations(QC). The static weight loss results showed that the addition of 20 mg/L [C16DMIM] [PF6] could achieve 80.1% inhibition efficiency, and the combination of 20 mg/L KI could achieve 95.9% efficiency and maintain 94.1% efficiency after 7h. The electrochemical results showed that both [C16DMIM] [PF6] and the compounded corrosion inhibitor showed a mixed inhibition mode, and the impedance test revealed that the corrosion inhibitor formed a double electric layer to reduce corrosion through the charge transfer process. Scanning electron microscopy (SEM) observed that the surface of the mild steel was smooth and the corrosion depth was reduced after the effect of the compound corrosion inhibitor. The synergistic effect of ILs and KI is optimal. The synergistic mechanism is that I- preferentially adsorbs on the surface to form a bridge and thus attracts the protonated [C16DMIM] [PF6] for adsorption, which in turn enhances the strength of the adsorbed film and makes the protective film denser.