[guided]Assume that $\mathfrak g$ is nilpotent. By definition, this means that the lower central series eventually reaches $0$: there is an integer $c \geq 0$ such that $\gamma_{c+1}(\mathfrak g)=0$.
If $c=0$, then $\gamma_1(\mathfrak g)=\mathfrak g=0$. In that case the one-term chain $0=\mathfrak g_0=\mathfrak g$ satisfies the required condition, since there are no indices $i$ with $1 \leq i \leq 0$.
Now suppose $c \geq 1$. The central series should climb from $0$ up to $\mathfrak g$, while the lower central series descends from $\mathfrak g$ down to $0$. Therefore we reverse the lower central series. For each integer $0 \leq i \leq c$, define
\begin{align*}
\mathfrak g_i := \gamma_{c+1-i}(\mathfrak g).
\end{align*}
This gives the correct endpoints:
\begin{align*}
\mathfrak g_0=\gamma_{c+1}(\mathfrak g)=0,
\qquad
\mathfrak g_c=\gamma_1(\mathfrak g)=\mathfrak g.
\end{align*}
We must still verify that these subspaces are ideals and that they form an increasing chain. First we prove that every lower central term is an ideal of $\mathfrak g$. The first term $\gamma_1(\mathfrak g)=\mathfrak g$ is an ideal. Suppose $\gamma_j(\mathfrak g)$ is an ideal. We must show that $\gamma_{j+1}(\mathfrak g)=[\mathfrak g,\gamma_j(\mathfrak g)]$ is stable under bracketing with arbitrary elements of $\mathfrak g$. It is enough to check generators of $[\mathfrak g,\gamma_j(\mathfrak g)]$. Let $x,y \in \mathfrak g$ and let $z \in \gamma_j(\mathfrak g)$. The Jacobi identity gives
\begin{align*}
[x,[y,z]] = [[x,y],z] + [y,[x,z]].
\end{align*}
Because $[x,y]\in \mathfrak g$ and $z\in \gamma_j(\mathfrak g)$, the term $[[x,y],z]$ lies in $[\mathfrak g,\gamma_j(\mathfrak g)]$. Because $\gamma_j(\mathfrak g)$ is an ideal, $[x,z]\in \gamma_j(\mathfrak g)$, so $[y,[x,z]]$ also lies in $[\mathfrak g,\gamma_j(\mathfrak g)]$. Hence $[x,[y,z]]\in \gamma_{j+1}(\mathfrak g)$, proving that $\gamma_{j+1}(\mathfrak g)$ is an ideal.
Since each $\gamma_j(\mathfrak g)$ is an ideal, it is stable under brackets with elements of $\mathfrak g$. Therefore
\begin{align*}
\gamma_{j+1}(\mathfrak g)=[\mathfrak g,\gamma_j(\mathfrak g)]\subseteq \gamma_j(\mathfrak g).
\end{align*}
Thus the lower central series is decreasing. Reversing a decreasing chain gives an increasing chain, so
\begin{align*}
0=\mathfrak g_0 \subseteq \mathfrak g_1 \subseteq \cdots \subseteq \mathfrak g_c=\mathfrak g.
\end{align*}
It remains to check the centrality condition. For each integer $1 \leq i \leq c$, the definition of $\mathfrak g_i$ and the recurrence defining the lower central series give
\begin{align*}
[\mathfrak g,\mathfrak g_i]
=
[\mathfrak g,\gamma_{c+1-i}(\mathfrak g)]
=
\gamma_{c+2-i}(\mathfrak g)
=
\mathfrak g_{i-1}.
\end{align*}
Thus $[\mathfrak g,\mathfrak g_i]\subseteq \mathfrak g_{i-1}$ for every $1 \leq i \leq c$, so the reversed lower central series is a central series.[/guided]