[proofplan]
We use a determinant trick. Pick generators $b_1, \ldots, b_n$ of $M$. The hypothesis $\mathfrak{m} M = M$ produces a matrix $A \in \mathfrak{m}^{n \times n}$ with $b_i = \sum_j a_{ij} b_j$, equivalently $(I_n - A)b = 0$ for the column vector $b = (b_1, \ldots, b_n)^\top$. Multiplying by the classical adjugate, $\det(I_n - A)$ annihilates each $b_i$, hence all of $M$. The diagonal of $I_n - A$ has entries $1 - a_{ii} \notin \mathfrak{m}$, while every off-diagonal entry lies in $\mathfrak{m}$, so the Leibniz expansion shows $\det(I_n - A) \equiv 1 \pmod{\mathfrak{m}}$, i.e. $\det(I_n - A)$ is a unit in $R$. A unit annihilator forces $M = 0$.
[/proofplan]
[step:Choose a finite generating set and assemble the matrix equation $\mathfrak{m} M = M$ implies]
Since $M$ is finitely generated over $R$, fix generators $b_1, \ldots, b_n \in M$ so that
\begin{align*}
M = R b_1 + \cdots + R b_n.
\end{align*}
The hypothesis $\mathfrak{m} M = M$ means every element of $M$ is a finite $R$-linear combination $\sum_j r_j m_j$ with $r_j \in \mathfrak{m}$ and $m_j \in M$. In particular, for each $i \in \{1, \ldots, n\}$ we may write $b_i \in \mathfrak{m} M$, and then expand each contributing element of $M$ in the generators $b_1, \ldots, b_n$:
\begin{align*}
b_i = \sum_{j=1}^n a_{ij}\, b_j, \qquad a_{ij} \in \mathfrak{m}.
\end{align*}
Let $A = (a_{ij}) \in M_n(\mathfrak{m})$ — a square matrix with all entries in $\mathfrak{m}$ — and let $b = (b_1, \ldots, b_n)^\top \in M^n$. The above relations are the single matrix equation
\begin{align*}
(I_n - A)\,b = 0 \quad \text{in } M^n.
\end{align*}
[/step]
[step:Extract a scalar annihilator via the classical adjugate]
For any commutative ring $R$ and $n \times n$ matrix $B \in M_n(R)$, the classical adjugate $\operatorname{adj}(B) \in M_n(R)$ satisfies $\operatorname{adj}(B)\, B = \det(B)\, I_n$ — this is the [Cayley identity for the adjugate](/theorems/???), which holds over any commutative ring (the entries of $\operatorname{adj}(B)$ are signed $(n-1) \times (n-1)$ minors of $B$, and the identity is a formal polynomial identity in the entries of $B$).
Apply this to $B = I_n - A$ and multiply $(I_n - A)b = 0$ on the left by $\operatorname{adj}(I_n - A)$:
\begin{align*}
0 = \operatorname{adj}(I_n - A) \cdot (I_n - A) \cdot b = \det(I_n - A) \cdot I_n \cdot b = \det(I_n - A) \cdot b.
\end{align*}
Reading this componentwise, $\det(I_n - A)\, b_i = 0$ for every $i$. Since the $b_i$ generate $M$ as an $R$-module, the scalar $\det(I_n - A) \in R$ annihilates every element of $M$:
\begin{align*}
\det(I_n - A) \cdot M = 0.
\end{align*}
[guided]
We need to extract a scalar $r \in R$ with $r \cdot M = 0$, since the only further input we have is that $R$ is local — a property of scalars, not of matrices. The matrix relation $(I_n - A)b = 0$ is the obstacle: it is a vector relation in $M^n$, and we need to convert it to a scalar relation.
The conversion is the [Cayley identity for the adjugate](/theorems/???): for any commutative ring $R$ and any $B \in M_n(R)$, the adjugate matrix $\operatorname{adj}(B)$ — whose $(i,j)$ entry is the signed $(n-1) \times (n-1)$ minor of $B$ obtained by deleting row $j$ and column $i$ — satisfies
\begin{align*}
\operatorname{adj}(B) \cdot B = \det(B) \cdot I_n.
\end{align*}
This is a formal polynomial identity in the entries $b_{ij}$, so it holds over any commutative ring; in particular, over $R$.
Multiplying the relation $(I_n - A)b = 0 \in M^n$ on the left by $\operatorname{adj}(I_n - A) \in M_n(R)$ and using the Cayley identity with $B = I_n - A$:
\begin{align*}
0 = \operatorname{adj}(I_n - A) \cdot (I_n - A) \cdot b = \det(I_n - A) \cdot b.
\end{align*}
This is now a scalar-times-vector relation: the scalar $\det(I_n - A) \in R$ annihilates the column vector $b$, i.e. annihilates each generator $b_i$ of $M$. Since the $b_i$ generate $M$ as an $R$-module and the annihilator of $M$ is an ideal of $R$, we conclude $\det(I_n - A) \cdot M = 0$.
The point of the trick: instead of inverting the matrix $I_n - A$ (which would require it to be invertible over $R$), we extract a single scalar — its determinant — that does the same job on the generators, hence on the whole module.
[/guided]
[/step]
[step:Show $\det(I_n - A)$ is a unit using locality]
Compute $\det(I_n - A)$ modulo $\mathfrak{m}$. The reduction map $R \to R/\mathfrak{m}$ extends entrywise to a ring homomorphism $M_n(R) \to M_n(R/\mathfrak{m})$, which sends determinants to determinants. Since every $a_{ij} \in \mathfrak{m}$, the matrix $I_n - A$ reduces to $I_n \in M_n(R/\mathfrak{m})$, so
\begin{align*}
\det(I_n - A) \bmod \mathfrak{m} = \det(I_n) = 1 \in R/\mathfrak{m}.
\end{align*}
Equivalently, $\det(I_n - A) - 1 \in \mathfrak{m}$, so $\det(I_n - A) \notin \mathfrak{m}$.
Now we use that $R$ is local: in a local ring, the maximal ideal $\mathfrak{m}$ consists precisely of the non-units, so an element of $R$ is a unit if and only if it lies outside $\mathfrak{m}$. Hence $\det(I_n - A)$ is a unit in $R$.
[guided]
We want to conclude that $\det(I_n - A)$ is invertible. The Leibniz expansion gives
\begin{align*}
\det(I_n - A) = \sum_{\sigma \in S_n} \operatorname{sgn}(\sigma) \prod_{i=1}^n (I_n - A)_{i, \sigma(i)}.
\end{align*}
Group the terms by whether the permutation $\sigma$ is the identity. For $\sigma = \mathrm{id}$, the product is $\prod_{i=1}^n (1 - a_{ii})$, which expands as $1$ plus terms each containing at least one factor $a_{ii} \in \mathfrak{m}$. For $\sigma \neq \mathrm{id}$, there exists at least one $i$ with $\sigma(i) \neq i$, so the product contains the off-diagonal factor $(I_n - A)_{i, \sigma(i)} = -a_{i, \sigma(i)} \in \mathfrak{m}$, and the whole product lies in $\mathfrak{m}$.
Either way, all terms except the leading $1$ in the identity-permutation expansion lie in $\mathfrak{m}$, so
\begin{align*}
\det(I_n - A) \equiv 1 \pmod{\mathfrak{m}}.
\end{align*}
This is exactly where the **locality of $R$** is consumed: in a [local ring](/theorems/2128), the maximal ideal is the set of non-units, equivalently $R^\times = R \setminus \mathfrak{m}$. Since $\det(I_n - A) - 1 \in \mathfrak{m}$ and $1 \notin \mathfrak{m}$ (else $\mathfrak{m} = R$ and $R$ would be the zero ring, contradicting the existence of a maximal ideal), we have $\det(I_n - A) \notin \mathfrak{m}$, so $\det(I_n - A) \in R^\times$.
If $R$ were not local, this step would fail: a non-local ring can have non-units outside of its various maximal ideals only when those maximal ideals do not jointly cover $R \setminus R^\times$ — which they always do — so the equivalence "non-unit $\iff$ in some maximal ideal" would not pin down units to a single maximal ideal.
[/guided]
[/step]
[step:Conclude $M = 0$ from the unit annihilator]
By Step 2, $\det(I_n - A) \cdot M = 0$. By Step 3, $\det(I_n - A) \in R^\times$ is a unit, so it has a two-sided multiplicative inverse $u \in R$. For every $m \in M$,
\begin{align*}
m = u \cdot \det(I_n - A) \cdot m = u \cdot 0 = 0.
\end{align*}
Hence $M = 0$, completing the proof.
[/step]