Hartree-Fock equations for the impure spin-\textonehalf{} Ising-Heisenberg chain are derived by using the Green-function technique in the pseudofermion representation. The self-consistency equations for the ideal spin-\textonehalf{} anisotropic Heisenberg antiferromagnet can be recovered as a specific case of the general formalism developed in the present work. In the case of the nonideal
XXZ chain, a numerical solution of the self-consistency equations is used to describe the Friedel-type boundary on impurity-induced oscillations of the local magnetization considered previously in the spin-\textonehalf{}
XY model.