Let $T: A^n \to A^n$ be a morphism and let's use the same notation for its matrix, $T=(t_{ij})$. Let us assume that $det(T)=0$ and I will prove that $T$ fails to be injective.
There must be an integer $k$ such that there exists a minor of rank $k$ with nonzero determinant and any minor of larger rank has determinant zero. Without loss of generality, we can assume that the minor sits in the first $k$ rows and first $k$ columns. If $k=0$, then $T=0$, which is trivial. Since our task is to find a non-zero vector $x=(x_1,\cdots,x_n)$ killed by $T$ and inparticular our vector can be chosen to have the form $(x_1,\cdots,x_{k+1},0,\cdots,0)$, it suffices to assume that n=k+1.
Having adopted these assumptions, since $TT^*=det(T)I=0$, we just have to find a vector $x\neq 0$ such that $T^*x=0$, where $T^*$ is the adjugate matrix of $T$. Now $T^*$ is obviously nonzero since the first $k\times k$ minor of $T$ has nonzero determinant. Hence, such an $x$ must exist(assuming that the ring in question has a unit) and we are home!