In this paper, ion milling-induced conductivity-type conversion in p-type HgCdTe molecular beam epitaxy-grown films with graded-gap surface layers is studied. As expected, the chemical composition of the graded-gap layer strongly affects the conversion depth. At the composition of the layer on the surface, x v > 0.5, ion fluences typically used for fabricating p-n junctions in HgCdTe create only a damaged surface n + -layer with no deep conversion. With lower x v , conversion with controllable depth due to diffusion of interstitial mercury atoms Hg I can be achieved. Defect reactions in the graded-gap surface layers under the milling and post-milling ageing, which are caused by interaction of Hg I with dislocations, differ from those in the deep converted layers, where Hg I reacts with point defects. It is shown that when assessing the depth of a p-n junction fabricated with ion milling in HgCdTe with a graded-gap surface layer, it is necessary to consider the effect of the material removal from the surface.