I don’t think that it require to use induction here. For avoid possible confusion, let’s just separate the case when $n=2$ and $n \neq 2$.
Proof. Let $n \in \Bbb{N}$ such that $n \geq 2$ and $A \in \mathcal{M}_{n}(\Bbb{K})$ and suppose that $\text{adj}(A) = \mathcal{O}_n$. If $n = 2$, then (as you well pointed out) $A = \mathcal{O}_2$. Since $\text{rank}\mathcal{O}_2 = 0$ and $0 \leq 0 = 2 - 2$, the proposition if true. Suppose now that, $n > 2$. Since, $\text{adj}A = \mathcal{O}_{n}$, we know that $\det{A} = 0$. So, $A$ is not invertible, which means that $\text{rank}A < n$, i.e., $\text{rank}A \leq n-1$. Suppose that $\text{rank}A = n-1$. This means that there is one row that is a linear combination of the remaking rows. Then, if we consider the matrix of size $n-1 \times n$ that we obtain by eliminating that row, we get a matrix that has rank equal to $n-1$. This means that we also have a column in this $n \times 1$ that is a linear combination of the remaining columns. So, the matrix of size $n-1 \times n-1$ that we obtain by further eliminating this column has rank equal to $n-1$. This means that this matrix is invertible. Hence, its determinant is not null. But this implies that one of the entries of $\text{adj}A$ is not zero, which is a contradiction. Therefore, the rank of $A$ cannot be $n-1$. Therefore, we conclude that $\text{rank}A \leq n-2$. $\square$