Let \(0<p<\infty \) , and let \(\mu \) be a finite positive Borel measure on the unit disk \(\mathbb {D}\) . We study the Hankel matrix \((\mu [i+j])_{i,j\ge 0}\) with entries \(\mu [i+j]=\int _{\mathbb {D}}z^{i+j}d\mu (z)\) , which formally induces the operator \(S_{p}[\mu ]\) defined as \(\begin{aligned} S_{p}[\mu ](f)(z)=\sum _{n=0}^{\infty }\left( \sum _{k=0}^{\infty }(n+k+1)^{p-1}\mu [n+k ]a_{k}\right) z^{n},\quad z\in \mathbb {D}, \end{aligned}\) where \(f(z)=\sum _{n=0}^{\infty }a_{n}z^{n}\) is an analytic function in \(\mathbb {D}\) . We characterize the positive Borel measures \(\mu \) supported on \((-1,1)\) for which \(S_{p}[\mu ]\) is bounded (resp. compact) from one Dirichlet space \(\mathcal {D}_{\alpha }\) to another \(\mathcal {D}_{\beta }\) . Additionally, we investigate the boundedness (resp. compactness) of \(S_{p}[\mu ]\) on Dirichlet-type spaces \(\mathcal {D}_{\alpha }^{l}\) . Our results generalize those of Bao and Wulan when \(\alpha =\beta \) or \(l=2\) .