The mercury is contaminated with iron. Is there any way to remove iron from mercury?
As iron is one of few metals not forming amalgams,
Almost all metals can form amalgams with mercury, the notable exceptions being iron, platinum, tungsten, and tantalum.
..it should preferably contaminate the mercury surface.
I would try, perhaps repeated, dropping mercury, e.g via punched filtration paper to sulphuric acid bath.
It can be combined with agitating mercury - acid phase border.
Important can be the origin of impurity and the intended purpose of purified mercury. There is possible the only reasonable way would be distillation, mentioned in the other answer, respecting the warning.
Non-amalgamation of mercury with iron means that the iron is not dissolved, and therefore floats on the surface as a dross. However, non-amalgamation does not mean total insolubility. If a few ppm of iron needs to be removed, washing with a dilute solution of HNO3 might be best, with much agitation.
There will be some dissolution of mercury to Hg++. That's just a loss due to purification, and can be minimized. Hg++ ion in solution will be reduced by Fe metal in the mercury liquid until there is no more iron in the mercury and there is some slight excess of Hg++ ion in solution. This approach will also remove other contaminants. You will be able to see a bright mercury surface when it is purified.
Other methods have relied on agitation (oxidation) in air and removal of dross, and might suffice, but is probably not as complete as washing with nitric acid.
Several decades ago I used a lot of mercury (in polarography with a dropping mercury electrode) and purified it by distillation in a still looking something like this https://www.researchgate.net/figure/Distillation-apparatus-for-mercury-cells-a-and-design-b-del-Campo-et-al-2008_fig1_325075540
However, mercury is toxic, especially in vapour, I strongly recommend against doing this unless you really know what you're doing.