The dependence of the conversion depth in CdxHg₁–xTe alloys subjected to ion-beam milling (CMT) on alloy composition and treatment temperature is studied both experimentally and theoretically. It is shown that in compositionally homogeneous crystals the dependence is defined by internal electric fields, which affect the diffusion of charged intrinsic defects that arise as a result of the treatment. The results of calculations of the effect of the potentials of the p-n junction formed by ion-milling on the conversion depth fit well both the original experimental data and those taken from the literature. The data obtained confirm the validity of the diffusion model of the formation of the excessive mercury source in CMT subjected to ion-beam milling, which was proposed by the authors earlier. The results gained allow one to precisely predict and control the conversion depth in CMT crystals and epitaxial layers subjected to ion milling for p-n junction fabrication. This makes the results presented in the paper useful in CMT infrared detector technology.