Processes of formation of n + –n−–p-structures in boron-implanted heteroepitaxial (HEL) CdxHg1–xTe (CMT) layers of p-type grown by molecular beam epitaxy (HEL CMT MBE) with different compositions of the upper graded-gap layer are studied. It is shown that the surface composition (xs) of HEL CMT MBE significantly affects both the electrical parameters of the implanted layer and the spatial distribution of radiation defects of donor type. For HEL CMT MBE with the small surface composition xs = 0.22–0.33, it is found that the layer electron concentration (Ns) is decreased after saturation with accumulation of radiation defects, as the dose of B+ ions is increased in the range of D = 1⋅1011−3⋅1015 сm–2. An increase of the surface composition up to xs = 0.49−0.56 results in a significant decrease in Ns and a disappearance of the saturation of concentration in the whole dose range. The value of Ns monotonically increases with the energy (E) of boron ions and composition xs. It is found that for B+-ion energies E = 20−100 keV, the depth of the surface n + -layer increases with increasing energy and exceeds the total projected path of boron ions. However, in the energy range E = 100–150 keV, the depth of n+-layer stops increasing with the increase of the surface composition. The depth (dn) of a lightly doped n−-layer monotonically decreases with increasing energy of boron ions in the entire range of E = 20–150 keV. With increasing dose (D) of B+ ions in the interval D = 1⋅1014−1⋅1015сm−2, deep n−-layers with dn = 4−5 μm are formed only in the HEL CMT MBE with xs = 0.22−0.33. For the samples with xs = 0.49−0.56, the depth changes in the interval dn = 1.5−2.5 μm. At D ≤ 3⋅1013сm–2, n + –n−–p-structure is not formed for all surface compositions, if implantation is performed at room temperature. However, implantation at T = 130°C leads to the formation of a deep n−-layer. Planar photodiodes with the n–p-junction area of А = 35×35 μm2 made on the basis of the boron implanted HEL CMT MBE with the surface compositions xs = 0.33−0.56 had high differential resistance Rd = 3⋅106−107 Ω∙cm2 and high product R0 Aeff = 9.0−20.7 Ω∙cm2, where Aeff is the effective area of the charge carrier collecting. The values of Rd and R0 Aeff increased with increasing xs. It is found that the layer electron concentration in the boron implanted HEL CMT MBE with different surface compositions is increased, when exposed to normal conditions for a few years.