Let 𝐻 and 𝐺 be groups with 𝐻 abelian and let 𝜑 ∈𝖦𝗋𝗉(𝐺,𝐻).
Then 𝜑([𝑎,𝑏]) =𝜑(𝑎)𝜑(𝑏)𝜑(𝑎)−1𝜑(𝑏)−1 =𝑒.
But every element of the Commutator subgroup [𝐺,𝐺] is a product of such commutators,
so 𝜑[𝐺,𝐺] ={𝑒}.
Now let 𝐻 a group such that [𝐺,𝐺] ⊆ker𝜑 for every group 𝐺 and every homomorphism 𝜑 ∈𝖦𝗋𝗉(𝐺,𝐻).
Let 𝐺 =𝐻 and 𝜑 =id𝐺.
It follows that [𝐻,𝐻] ={𝑒}.
Therefore 𝐻 is abelian.