Here is the proof from Knapp's "Lie groups beyond an introduction":
Since $\mathfrak{h}$ is nilpotent, it is solvable and ad$\mathfrak{h}$ is solvable as a subalgebra of transformations of $\mathfrak{g}$. By Lie's Theorem it is triangular in some basis. For any three triangular matrices $A,B,C$ we have tr(ABC)=tr(BAC). Therefore $tr(ad[H_1, H_2]ad H)=0 \ \ \ (1)$ for $H_1, H_2, H \in \mathfrak{h}$.
Next, let $\alpha$ be a generalized non-zero weight, let $X$ be in $\mathfrak{g}_{\alpha}$ and let $H$ be in $\mathfrak{h}$. Then $ad H adX$ carries $\mathfrak{g}_{\beta}$ to $\mathfrak{g}_{\alpha+\beta}$. Since $\mathfrak{g}=\oplus \mathfrak{g}_{\alpha}$ we get $tr(adH adX)=0 \ \ \ (2) $ Specializing (2) to $H=[H_1, H_2]$ we have that $k([H_1, H_2], X)=0$ where $k$ is the Killing form. Together with (1) we get that $k([H_1, H_2], Y)=0$ for all $Y \in \mathfrak{g}$. Since $k$ is non-degenerate for $\mathfrak{g}$ simple we conclude that $[H_1, H_2]=0$.