6. Given in the sequence $\left.a_{n}\right\}$, $a_{1}=1, S_{n}$ is the sum of the first $n$ terms, and satisfies $S_{n}=n^{2} a_{n}(n=1,2, \cdots)$. Then the expression for $a_{n}$ is
(A) $\frac{1}{n+2}(n \geqslant 2)$
(B) $\frac{1}{n(n-1)}(n \geqslant 3)$
(C) $\frac{1}{2(n+1)}(n \geqslant 4)$
(D) $\frac{2}{n(n+1)}$
6. (D).
$$
\begin{array}{l}
\because a_{1}=S_{1}=1, S_{n}=n^{2} a_{n}=n^{2}\left(S_{n}-S_{n-1}\right), \\
\left(n^{2}-1\right) S_{n}=n^{2} S_{n-1}, \\
\therefore \frac{n+1}{n} S_{n}=\frac{n}{n-1} S_{n-1}(n \geqslant 2) .
\end{array}
$$

Let $x_{n}=\frac{n+1}{n} S_{n}$, then $x_{n-1}=\frac{n}{n-1} S_{n-1}$.
Thus $x_{n}=x_{n-1}$, so the sequence $\left\{x_{n}\right\}$ is a constant sequence, and we have
$$
x_{n}=x_{1}=\frac{1+1}{1} S_{1}=2 S_{1}=2 \text {. }
$$

Therefore, $\frac{n+1}{n} S_{n}=2 \Rightarrow S_{n}=\frac{2 n}{n+1}, a_{n}=\frac{S_{n}}{n^{2}}=\frac{2}{n(n+1)}$.