Of course, $0$ is an eigenvalue of $A$ with geometric multiplicity $n-1$. From there we have two possibilities:
One possibility is that $A$ has a second eigenvalue besides zero, which is true if and only if $\operatorname{rank}(A^2) = \operatorname{rank}(A) = 1$ (since the image of $A$ is a one-dimensional invariant subspace). In this case, $A$ is diagonalizable with minimal polynomial $p(x) = x(x- \lambda)$ for non-zero eigenvalue $\lambda$.
The other possibility is that $0$ is the only eigenvalue of $A$. In this case, we find that since $\operatorname{rank}(A^2)<\operatorname{rank}(A)$, we must have $A^2 = 0$. So, the minimal polynomial of $A$ is $p(x) = x^2$.
In either case, the minimal polynomial of $A$ has degree $2$, as we wanted to show.