[proofplan]
Realize $U(\mathfrak g)$ as the quotient of the tensor algebra $T(\mathfrak g)$ by the two-sided ideal imposing the Lie bracket relations. The universal property of the tensor algebra first extends the underlying [linear map](/page/Linear%20Map) $\varphi:\mathfrak g\to A$ to a unital algebra homomorphism $F:T(\mathfrak g)\to A$. Since $\varphi$ preserves Lie brackets, $F$ vanishes on the defining ideal of $U(\mathfrak g)$, so it factors through the quotient. Uniqueness follows because $U(\mathfrak g)$ is generated as a unital algebra by the image of $\mathfrak g$.
[/proofplan]
[step:Fix the quotient model of $U(\mathfrak g)$ and the canonical map]
Let
\begin{align*}
j:\mathfrak g\to T(\mathfrak g)
\end{align*}
denote the canonical inclusion of $\mathfrak g$ into degree $1$ of its tensor algebra. Define $I\subset T(\mathfrak g)$ to be the two-sided ideal generated by all elements
\begin{align*}
j(x)j(y)-j(y)j(x)-j([x,y]_{\mathfrak g})
\end{align*}
with $x,y\in\mathfrak g$. In the quotient construction of the universal enveloping algebra,
\begin{align*}
U(\mathfrak g)=T(\mathfrak g)/I.
\end{align*}
Let
\begin{align*}
q:T(\mathfrak g)\to U(\mathfrak g)
\end{align*}
be the quotient homomorphism. The canonical map
\begin{align*}
i:\mathfrak g\to U(\mathfrak g)
\end{align*}
is
\begin{align*}
i=q\circ j.
\end{align*}
[/step]
[step:Extend $\varphi$ from $\mathfrak g$ to the tensor algebra]
The map $\varphi:\mathfrak g\to A_{\mathrm{Lie}}$ is in particular a $\mathbb C$-linear map from $\mathfrak g$ to the underlying [vector space](/page/Vector%20Space) of $A$. By the universal property of tensor algebras, equivalently because $T(\mathfrak g)$ is the free associative unital $\mathbb C$-algebra on the underlying vector space of $\mathfrak g$, there is a unique unital $\mathbb C$-algebra homomorphism
\begin{align*}
F:T(\mathfrak g)\to A
\end{align*}
such that
\begin{align*}
F\circ j=\varphi.
\end{align*}
Equivalently, for every integer $m\ge 1$ and every $x_1,\dots,x_m\in\mathfrak g$,
\begin{align*}
F(j(x_1)\cdots j(x_m))=\varphi(x_1)\cdots\varphi(x_m),
\end{align*}
and $F(1_{T(\mathfrak g)})=1_A$.
[/step]
[step:Show that the tensor algebra homomorphism kills the defining relations]
For $x,y\in\mathfrak g$, multiplicativity of $F$ and the identity $F\circ j=\varphi$ give
\begin{align*}
F(j(x)j(y)-j(y)j(x)-j([x,y]_{\mathfrak g}))=\varphi(x)\varphi(y)-\varphi(y)\varphi(x)-\varphi([x,y]_{\mathfrak g}).
\end{align*}
Since $\varphi:\mathfrak g\to A_{\mathrm{Lie}}$ is a [Lie algebra](/page/Lie%20Algebra) homomorphism,
\begin{align*}
\varphi([x,y]_{\mathfrak g})=[\varphi(x),\varphi(y)]_{A_{\mathrm{Lie}}}.
\end{align*}
By the definition of the bracket on $A_{\mathrm{Lie}}$,
\begin{align*}
[\varphi(x),\varphi(y)]_{A_{\mathrm{Lie}}}=\varphi(x)\varphi(y)-\varphi(y)\varphi(x).
\end{align*}
Therefore
\begin{align*}
F(j(x)j(y)-j(y)j(x)-j([x,y]_{\mathfrak g}))=0.
\end{align*}
Thus $F$ vanishes on the generating set of the two-sided ideal $I$. Since $F$ is an algebra homomorphism, it vanishes on every finite sum of left and right multiples of these generators, hence
\begin{align*}
I\subseteq \ker F.
\end{align*}
[guided]
The quotient defining $U(\mathfrak g)$ forces multiplication in the tensor algebra to remember the Lie bracket. The relations being imposed are precisely
\begin{align*}
j(x)j(y)-j(y)j(x)=j([x,y]_{\mathfrak g})
\end{align*}
for $x,y\in\mathfrak g$. To show that $F:T(\mathfrak g)\to A$ descends to the quotient, we must prove that every defining relation is sent to $0$.
Fix $x,y\in\mathfrak g$. Since $F$ is a unital algebra homomorphism and $F\circ j=\varphi$, we compute
\begin{align*}
F(j(x)j(y)-j(y)j(x)-j([x,y]_{\mathfrak g}))=\varphi(x)\varphi(y)-\varphi(y)\varphi(x)-\varphi([x,y]_{\mathfrak g}).
\end{align*}
Now use exactly the hypothesis that $\varphi$ is a Lie algebra homomorphism into $A_{\mathrm{Lie}}$. This means
\begin{align*}
\varphi([x,y]_{\mathfrak g})=[\varphi(x),\varphi(y)]_{A_{\mathrm{Lie}}}.
\end{align*}
The bracket on $A_{\mathrm{Lie}}$ is the commutator bracket, so
\begin{align*}
[\varphi(x),\varphi(y)]_{A_{\mathrm{Lie}}}=\varphi(x)\varphi(y)-\varphi(y)\varphi(x).
\end{align*}
Substituting this into the previous computation gives
\begin{align*}
F(j(x)j(y)-j(y)j(x)-j([x,y]_{\mathfrak g}))=0.
\end{align*}
This proves that $F$ kills each generator of the two-sided ideal $I$. Because $I$ consists of finite sums of elements obtained by multiplying these generators on the left and right by arbitrary elements of $T(\mathfrak g)$, multiplicativity and linearity of $F$ imply that $F$ kills all of $I$. Hence
\begin{align*}
I\subseteq \ker F.
\end{align*}
[/guided]
[/step]
[step:Factor through the quotient to obtain $\Phi$]
Since $I\subseteq \ker F$, the quotient property of $T(\mathfrak g)/I$ gives a unique unital $\mathbb C$-algebra homomorphism
\begin{align*}
\Phi:U(\mathfrak g)\to A
\end{align*}
such that
\begin{align*}
\Phi\circ q=F.
\end{align*}
Using $i=q\circ j$, we obtain
\begin{align*}
\Phi\circ i=\Phi\circ q\circ j=F\circ j=\varphi.
\end{align*}
Thus a unital $\mathbb C$-algebra homomorphism with the required property exists.
[/step]
[step:Prove uniqueness from generation by the image of $\mathfrak g$]
Let
\begin{align*}
\Psi:U(\mathfrak g)\to A
\end{align*}
be a unital $\mathbb C$-algebra homomorphism such that
\begin{align*}
\Psi\circ i=\varphi.
\end{align*}
We prove $\Psi=\Phi$.
The algebra $T(\mathfrak g)$ is generated as a unital algebra by $j(\mathfrak g)$. Since $q:T(\mathfrak g)\to U(\mathfrak g)$ is surjective and $i=q\circ j$, the algebra $U(\mathfrak g)$ is generated as a unital algebra by $i(\mathfrak g)$. Therefore every element of $U(\mathfrak g)$ is a finite $\mathbb C$-linear combination of products
\begin{align*}
i(x_1)\cdots i(x_m)
\end{align*}
with $m$ a positive integer and $x_1,\dots,x_m\in\mathfrak g$, together with the empty product $1_{U(\mathfrak g)}$.
For such a product, multiplicativity and the identities $\Phi\circ i=\varphi$ and $\Psi\circ i=\varphi$ give
\begin{align*}
\Phi(i(x_1)\cdots i(x_m))=\varphi(x_1)\cdots\varphi(x_m).
\end{align*}
The same computation gives
\begin{align*}
\Psi(i(x_1)\cdots i(x_m))=\varphi(x_1)\cdots\varphi(x_m).
\end{align*}
Also $\Phi(1_{U(\mathfrak g)})=1_A=\Psi(1_{U(\mathfrak g)})$ because both maps are unital. By $\mathbb C$-linearity, $\Phi$ and $\Psi$ agree on every element of $U(\mathfrak g)$. Hence $\Psi=\Phi$, proving uniqueness.
Combining existence and uniqueness proves the universal property of $U(\mathfrak g)$.
[/step]