An endomorphism of free groups
It's injective. Indeed, the image is free of rank $k\le n$, and is injective if and only if $k=n$ (as $F_n$ is Hopfian: is not a proper quotient of itself). Since the image surjects onto the abelianization $\mathbf{Z}^n$, we have $k=n$. More generally, any endomorphism of a free group that maps onto a finite index subgroup of the abelianization has to be injective.
As Aurel mentions, it can fail to be an automorphism: writing $F_2=\langle x,y\rangle$, the subgroup generated by $x$ and $(yx)y(yx)^{-1}$ is a proper subgroup (of infinite index).