[proofplan]
We prove the identity by evaluating the $\mathfrak{g}$-valued $2$-form $d\theta + \frac{1}{2}[\theta \wedge \theta]$ on a spanning family of vector fields. The left-invariant vector fields span every tangent space, and the expression is tensorial, so it is enough to test on two left-invariant fields. On such fields the Maurer-Cartan form is constant, so the [exterior derivative](/theorems/1525) reduces to the negative of the Lie bracket term, while the bracket wedge contributes exactly the opposite term.
[/proofplan]
[step:Reduce the identity to left-invariant vector fields]
For each $\xi \in \mathfrak{g}$, define the left-invariant vector field $X_\xi: G \to TG$ by $X_\xi(g) = d(L_g)_e(\xi)$ for each $g \in G$.
For each $g \in G$, the map $d(L_g)_e: \mathfrak{g} \to T_gG$ is a linear isomorphism, with inverse $d(L_{g^{-1}})_g$. Hence the vectors $\{X_\xi(g) : \xi \in \mathfrak{g}\}$ span $T_gG$.
Define the $\mathfrak{g}$-valued $2$-form
\begin{align*}
A := d\theta + \frac{1}{2}[\theta \wedge \theta] \in \Omega^2(G;\mathfrak{g}).
\end{align*}
Both $d\theta$ and $[\theta \wedge \theta]$ are $C^\infty(G)$-bilinear in vector fields after evaluation as $2$-forms, so $A$ is tensorial. Therefore, to prove $A = 0$, it is enough to prove
\begin{align*}
A(X_\xi,X_\eta) = 0
\end{align*}
for all $\xi,\eta \in \mathfrak{g}$.
[guided]
We want to prove an equality of $\mathfrak{g}$-valued $2$-forms. A $2$-form is determined pointwise by its values on pairs of tangent vectors, and it is enough to test those values on any spanning family at each tangent space.
For every $\xi \in \mathfrak{g}$, define the left-invariant vector field $X_\xi: G \to TG$ by $X_\xi(g) = d(L_g)_e(\xi)$ for each $g \in G$. This is the vector field obtained by translating the tangent vector $\xi \in T_eG$ to every other tangent space using left multiplication. For a fixed $g \in G$, the map $L_g: G \to G$ is a diffeomorphism with inverse $L_{g^{-1}}: G \to G$, so its differential
\begin{align*}
d(L_g)_e: \mathfrak{g} \to T_gG
\end{align*}
is a linear isomorphism. Its inverse is $d(L_{g^{-1}})_g: T_gG \to \mathfrak{g}$. Hence every vector in $T_gG$ has the form $X_\xi(g)$ for a unique $\xi \in \mathfrak{g}$.
Now define
\begin{align*}
A := d\theta + \frac{1}{2}[\theta \wedge \theta] \in \Omega^2(G;\mathfrak{g}).
\end{align*}
The expression $A$ is a genuine $2$-form, so its value $A_g(u,v)$ depends only on the tangent vectors $u,v \in T_gG$, not on the particular vector fields extending them. Therefore, since the vectors $X_\xi(g)$ span $T_gG$ for each $g \in G$, proving
\begin{align*}
A(X_\xi,X_\eta) = 0
\end{align*}
for all $\xi,\eta \in \mathfrak{g}$ proves $A_g(u,v)=0$ for every $g \in G$ and every $u,v \in T_gG$. This is exactly the assertion that $A=0$ in $\Omega^2(G;\mathfrak{g})$.
[/guided]
[/step]
[step:Evaluate the Maurer-Cartan form on left-invariant vector fields]
Let $\xi,\eta \in \mathfrak{g}$. By the definition of $\theta$ and $X_\xi$, for every $g \in G$,
\begin{align*}
\theta_g(X_\xi(g)) = d(L_{g^{-1}})_g(d(L_g)_e(\xi)).
\end{align*}
Since $L_{g^{-1}} \circ L_g = \operatorname{id}_G$, the chain rule gives
\begin{align*}
d(L_{g^{-1}})_g \circ d(L_g)_e = d(\operatorname{id}_G)_e = \operatorname{id}_{\mathfrak{g}}.
\end{align*}
Thus
\begin{align*}
\theta(X_\xi) = \xi, \qquad \theta(X_\eta) = \eta,
\end{align*}
where the right-hand sides denote the constant maps $G \to \mathfrak{g}$ with values $\xi$ and $\eta$.
[/step]
[step:Compute the exterior derivative term]
For a $\mathfrak{g}$-valued $1$-form, the exterior derivative is computed componentwise by
\begin{align*}
d\theta(X,Y) = X(\theta(Y)) - Y(\theta(X)) - \theta([X,Y])
\end{align*}
for vector fields $X,Y \in \mathfrak{X}(G)$, where $X(\theta(Y))$ denotes the derivative of the $\mathfrak{g}$-valued function $\theta(Y):G \to \mathfrak{g}$ in the direction $X$.
Applying this with $X=X_\xi$ and $Y=X_\eta$, the first two terms vanish because $\theta(X_\eta)$ and $\theta(X_\xi)$ are constant $\mathfrak{g}$-valued functions. Hence
\begin{align*}
d\theta(X_\xi,X_\eta) = -\theta([X_\xi,X_\eta]).
\end{align*}
The Lie algebra bracket on $\mathfrak{g}$ is defined by the bracket of left-invariant vector fields, so
\begin{align*}
[X_\xi,X_\eta] = X_{[\xi,\eta]_{\mathfrak{g}}}.
\end{align*}
Using the previous step,
\begin{align*}
d\theta(X_\xi,X_\eta) = -[\xi,\eta]_{\mathfrak{g}}.
\end{align*}
[/step]
[step:Compute the bracket wedge term and cancel]
By the stated definition of the bracket wedge,
\begin{align*}
[\theta \wedge \theta](X_\xi,X_\eta) = [\theta(X_\xi),\theta(X_\eta)]_{\mathfrak{g}} - [\theta(X_\eta),\theta(X_\xi)]_{\mathfrak{g}}.
\end{align*}
Using $\theta(X_\xi)=\xi$ and $\theta(X_\eta)=\eta$, this becomes
\begin{align*}
[\theta \wedge \theta](X_\xi,X_\eta) = [\xi,\eta]_{\mathfrak{g}} - [\eta,\xi]_{\mathfrak{g}}.
\end{align*}
Since the Lie bracket is antisymmetric, $[\eta,\xi]_{\mathfrak{g}} = -[\xi,\eta]_{\mathfrak{g}}$, and therefore
\begin{align*}
\frac{1}{2}[\theta \wedge \theta](X_\xi,X_\eta) = [\xi,\eta]_{\mathfrak{g}}.
\end{align*}
Combining this with the computation of $d\theta$ gives
\begin{align*}
\left(d\theta + \frac{1}{2}[\theta \wedge \theta]\right)(X_\xi,X_\eta) = -[\xi,\eta]_{\mathfrak{g}} + [\xi,\eta]_{\mathfrak{g}} = 0.
\end{align*}
Since $\xi,\eta \in \mathfrak{g}$ were arbitrary and left-invariant vector fields span every tangent space, the tensorial reduction proves
\begin{align*}
d\theta + \frac{1}{2}[\theta \wedge \theta] = 0.
\end{align*}
[/step]