  We utilize the variational method to study the Kondo screening of a
spin-$1/2$ magnetic impurity in a three-dimensional (3D) Weyl semimetal with
two Weyl nodes along the $k_z$-axis. The model reduces to a 3D Dirac semimetal
when the separation of the two Weyl nodes vanishes. When the chemical potential
lies at the nodal point, $\mu=0$, the impurity spin is screened only if the
coupling between the impurity and the conduction electron exceeds a critical
value. For finite but small $\mu$, the impurity spin is weakly bound due to the
low density of state, which is proportional to $\mu^2$, contrary to that in a
2D Dirac metal such as graphene and 2D helical metal where the density of
states is proportional to $|\mu|$. The spin-spin correlation function
$J_{uv}(\mathbf{r})$ between the spin $v$-component of the magnetic impurity at
the origin and the spin $u$-component of a conduction electron at spatial point
$\mathbf{r}$, is found to be strongly anisotropic due to the spin-orbit
coupling, and it decays in the power-law. The main difference of the Kondo
screening in 3D Weyl semimetals and in Dirac semimetals is in the spin $x$-
($y$-) component of the correlation function in the spatial direction of the
$z$-axis.
