Let $X_1, X_2, \ldots, X_n$ be IID normal variables with mean $\mu$ and variance $\sigma^2$. Let $\overline{X}$ be the mean of these variables, and define the deviations $D_i = \overline{X} – X_i$. Let $Y = [X_1 \ X_2 \ \ldots \ X_n]^T$ and $Z = [\overline{X} \ D_2 \ \ldots \ D_n]^T$. Let $S = \frac{1}{n-1} \sum D_i^2$ be the sample variance.
Independence of Sample Variance and Sample Mean
By definition, $Y \sim N(\mu \mathbf{1}, \sigma^2 \mathrm I)$. Also, $Z = A_n Y$ where, for example, $A_3$ looks like this:
$$
A_3 = \frac{1}{3}
\begin{bmatrix}
1 & 1 & 1 \\
1 & 1-3 & 1 \\
1 & 1 & 1-3 \\
\end{bmatrix}.
$$
Thus, $Z \sim N(A_n (\mu \mathbf{1}), A_n (\sigma^2 \mathrm I) A_n^T) = N(\mu A_n \mathbf{1}, \sigma^2 A_n A_n^T)$. But multiplying out $A_n A_n^T$, you can see that it has the form
$$ \frac{1}{n^2}
\begin{bmatrix}
n & \mathbf 0^T \\
\mathbf 0 & B
\end{bmatrix}
$$
for some matrix B (try multiplying it out with $A_3$ to see this). This implies the covariance between $\overline{X}$ and $D_2, \ldots, D_n$ is 0; and since they’re jointly normally distributed, it follows that $\overline X$ is independent of $D_2, \ldots, D_n$. And since $\sum D_i = 0$, $\overline X$ is also independent of $D_1$. Since $S$ is a function of the deviations, it’s also independent of $\overline X$.
Distribution of the Sample Variance and t-statistic
Note that
$$
\begin{eqnarray}
\sum (X_i – \mu)^2 &=& \sum ((X_i – \overline X) + (\overline X – \mu))^2 \\
&=& \sum D_i^2 + 2\sum (\overline X – \mu) (X_i – \overline X) + \sum (\overline X – \mu)^2 \\
&=& \sum D_i^2 + 2(\overline X – \mu) \sum(X_i – \overline X) + n(\overline X – \mu)^2 \\
&=& (n – 1)S + 0 + n(\overline X – \mu)^2 \\
&=& (n – 1)S + (\sqrt n (\overline X – \mu))^2.
\end{eqnarray}
$$
Divide through by $\sigma^2$ to yield
$$
\sum \left(\frac{X_i – \mu}{\sigma}\right)^2 = \frac{(n – 1)}{\sigma^2}S + \left(\sqrt n \frac{\overline X – \mu}{\sigma}\right)^2.
$$
The left side has $\chi^2_n$ distribution. The second term on the right-hand side is $\chi^2_1$. Since the two terms on the right are independent by the above section, we can take the MGF of both sides to yield $(1 – 2t)^\frac{n}{2} = M(t) (1-2t)^\frac{1}{2}$, where $M(t)$ is the MGF of $\frac{(n – 1)}{\sigma^2}S$. Thus, $M(t) = (1 – 2t)^\frac{n-1}{2}$ which is the MGF of the $\chi^2_{n-1}$ distribution.
So $\frac{1}{\sigma^2}S \sim\frac{1}{n – 1}\chi^2_{n-1}$. Let $T = \sqrt n \frac{\overline X – \mu}{\sqrt S}$. Then we can write
$$
\begin{eqnarray}
T &=& \frac{ \sqrt n \frac{\overline X – \mu}{\sigma} } {\frac{\sqrt S}{\sigma}} \\
&=& \frac{ \sqrt n \frac{\overline X – \mu}{\sigma} } {\sqrt {\frac{S}{\sigma^2}}}
\end{eqnarray}
$$
where the numerator and denominator are independent, the numerator has distribution $N(0, 1)$ and the denominator has distribution $\frac{1}{n-1}\chi^2_{n-1}$.