We present a diffuse-interface model for the solid-state dewetting problem with anisotropic surface energies in $${\mathbb {R}}^d$$
R
d
for $$d\in \{2,3\}$$
d
∈
{
2
,
3
}
. The introduced model consists of the anisotropic Cahn–Hilliard equation, with either a smooth or a double-obstacle potential, together with a degenerate mobility function and appropriate boundary conditions on the wall. Upon regularizing the introduced diffuse-interface model, and with the help of suitable asymptotic expansions, we recover as the sharp-interface limit the anisotropic surface diffusion flow for the interface together with an anisotropic Young’s law and a zero-flux condition at the contact line of the interface with a fixed external boundary. Furthermore, we show the existence of weak solutions for the regularized model, for both smooth and obstacle potential. Numerical results based on an appropriate finite element approximation are presented to demonstrate the excellent agreement between the proposed diffuse-interface model and its sharp-interface limit.