The invention discloses a method for purifying hydrogen fluoride in trifluoromethanesulfonyl fluoride, which comprises the following steps: firstly, pumping negative pressure in a mixing kettle, then introducing a crude trifluoromethanesulfonyl fluoride liquid, and adding an extracting agent to obtain a mixture; introducing nitrogen into the mixing kettle, transferring the mixture into a rectifying tower for rectifying, discharging heavy component impurities, and distilling out a light component trifluoromethanesulfonyl fluoride; and then introducing the evaporated light component trifluoromethanesulfonyl fluoride into an adsorption tower, adsorbing by adopting an adsorbent to obtain a refined trifluoromethanesulfonyl fluoride gas, and condensing into liquid in a refined tank. According to the invention, the extraction agent is adopted, and the action between the hydrogen fluoride and the extraction agent is utilized, so that the relative volatility between the hydrogen fluoride and the trifluoromethanesulfonyl fluoride is changed, and the vast majority of hydrogen fluoride can be removed; after the rectification process, the content of hydrogen fluoride in trifluoromethanesulfonyl fluoride is low, and the hydrogen fluoride is removed by using the adsorbent, so that the collapse of the adsorbent is avoided.