Self-consistent spin-polarised calculations are used to study the electronic structure and magnetic behaviour of transition-metal impurities of the 3d and 4d series in Ni. Electronic exchange and correlation are treated in the local spin-density approximation of density functional theory. The single-particle equations are solved for a muffin-tin model of the electronic potential. The potentials in the impurity muffin-tin sphere and in the surrounding muffin-tin spheres of the first-shell neighbour host atoms are assumed to be perturbed and calculated self-consistently. A correct embedding of these potentials in the infinite array of unperturbed host potentials is achieved by a Green function technique. The calculations yield local impurity moments which are antiparallel to the Ni host moments for the early elements Sc to Cr, Y to MO, parallel for the late elements Mn to CO, Tc to Pd and nearly zero for Cu, Zn, Ag and Cd. For most impurities the results agree rather well with the information from neutron scattering and magnetisation measurements; however, there are unexplained discrepancies for Cr and Rh impurities.