An adaptation of Derek's suggestion works.
Let $I$ be a set, $S$ a non-abelian simple group, $S^{(I)}$ the restricted power.
Proposition 1: every normal subgroup of $S^{(I)}$ equals $S^{(J)}$ for some $J\subset I$.
(Proof: standard exercise)
Corollary 2: for every group $G$, the only normal subgroup of $S\wr G=S^{(G)}\rtimes G$ contained in $S^{(G)}$ are $\{1\}$ and $S^{(G)}$.
(Proof: by the proposition it should be $S^{(J)}$ for some $J\subset G$, and from the normality assumption $J$ has to be left $G$-invariant.)
Corollary 3: now fix $S$ finite. let $G$ be a group with no nontrivial normal subgroup of exponent dividing the exponent of $S$, and such that $S\wr G$ is not isomorphic to a quotient of $G$. Then $S\wr G$ is Hopfian.
(Proof: since $G$ acts faithfully on $S^{(G)}$, every nontrivial normal subgroup intersects nontrivially $S^{(G)}$, and hence any proper quotient of $S\wr G$ is a quotient of $G$, so the second assumption ensures the conclusion.)
It remains to get an example. Fix $S$ finite nonabelian simple group. Fix $p$ prime not dividing $|S|$. Consider Ph. Hall's group $G_p$, defined as the quotient of the group of matrices $$m(n,x,y,z)=\begin{pmatrix}1&x&z\\0&p^n&y\\0&0&1\end{pmatrix},\quad (n,x,y,z)\in\mathbf{Z}\times\mathbf{Z}[1/p]^3$$ by the central cyclic subgroup generated by $m(0,0,0,1)$. It's well-known that $G_p$ is non-Hopfian (hint: use conjugation by the diagonal matrix $(p,1,1)$). Also, $G_p$ is finitely generated (by $\{m(1,0,0,0),m(0,1,0,0),m(0,0,1,0)\}$). Clearly its only order of torsion is given by powers of $p$, so the first assumption of Corollary 3 (on the exponent) holds. In addition, $S\wr G_p$ is isomorphic to a quotient of $G_p$, since $G_p$ is solvable but not $S\wr G_p$.
To conclude: for every prime $p$ and every finite non-abelian simple group $S$ of order coprime to $p$, $S\wr G_p$ is a Hopfian group, while its retract $G_p$ is non-Hopfian.