12. In the sequence $\left\{a_{n}\right\}$, it is known that
$$
a_{1}=6, a_{n}-2 a_{n-1}=\frac{2 a_{n-1}}{n}+n+1(n \geqslant 2) \text {. }
$$

Then the general term formula of this sequence $a_{n}=$
12. $(n+1)\left(2^{n+1}-1\right)$.

From the given condition, we have $\frac{a_{n}}{n+1}=2 \cdot \frac{a_{n-1}}{n}+1(n \geqslant 2)$.
Let $u_{n}=\frac{a_{n}}{n+1}$. Then
$$
u_{n}=2 u_{n-1}+1 \Rightarrow u_{n}+1=2\left(u_{n-1}+1\right)(n \geqslant 2) \text {. }
$$

Thus, $u_{n}+1=2^{n-1}\left(u_{1}+1\right), u_{1}=\frac{a_{1}}{2}=3$.
Therefore, $a_{n}=(n+1) u_{n}=(n+1)\left[2^{n-1}\left(u_{1}+1\right)-1\right]$
$$
=(n+1)\left(4 \times 2^{n-1}-1\right)=(n+1)\left(2^{n+1}-1\right) .
$$