Universal property of the Baker-Campbell-Hausdorff formula I will use homological grading.
Let $\mathfrak{g}$ be a dg Lie algebra. Then the set of elements of degree zero $\mathfrak{g}_0$ acts on the set of Maurer-Cartan elements
$$\mathrm{MC}(\mathfrak{g}):=\{x\in\mathfrak{g}_{-1}\mid dx+\tfrac{1}{2}[x,x] = 0\}$$
by what is called the gauge action. I will denote by $\lambda\cdot x$ the gauge action of an element $\lambda$ of degree $0$ on a Maurer-Cartan element $x$. There is a well known Baker-Campbell-Hausdorff formula
$$\mathrm{BCH}:\mathfrak{g}_0\times\mathfrak{g}_0\longrightarrow\mathfrak{g}_0$$
which makes $\mathfrak{g}_0$ into a group and which is such that
$$\mathrm{BCH}(\lambda_1,\lambda_2)\cdot x = \lambda_1\cdot(\lambda_2\cdot x)\ .$$
It starts with
$$\mathrm{BCH}(\lambda_1,\lambda_2) = \lambda_1 + \lambda_2 +\frac{1}{2}[\lambda_1,\lambda_2]+\cdots$$
My question is:

Is it possible to completely determine the Baker-Campbell-Hausdorff formula by its properties alone?

More precisely, I would like to have a reference or proof for the following statement:

The Baker-Campbell-Hausdorff formula is the only associative binary operation $\mathrm{BCH}:\mathfrak{g}_0\times\mathfrak{g}_0\longrightarrow\mathfrak{g}_0$ such that $\mathrm{BCH}(\lambda_1,\lambda_2)\cdot x = \lambda_1\cdot(\lambda_2\cdot x)$.

 A: I've got an answer to my question. I will write it in the context of ordinary (non dg) Lie algebras, but it easily generalizes.
First of all, notice that we want a formula that is the same for any Lie algebra. Therefore, we want it to come from a BCH formula on the free Lie algebra on two generators $\mathrm{Lie}(x,y)$, i.e. free bracketings of the elements $x$ and $y$ modulo the Jacobi relation and antisymmetry of the bracket. Then we obtain the BCH formula for an arbitrary Lie algebra $\mathfrak{g}$ by considering the map
$$\phi:\mathrm{Lie}(x,y)\longrightarrow\mathfrak{g}$$
sending $x\mapsto\lambda_1$ and $y\to\lambda_2$. We have
$$\mathrm{BCH}(\lambda_1,\lambda_2):=\phi(\mathrm{BCH}(x,y))\ .$$
Thus, the characterization of the BCH formula reduces to proving the uniqueness of such a formula for the free Lie algebra on two generators. It must satisfy
$$e^{ad_{\mathrm{BCH}(x,y)}} = e^{ad_x}e^{ad_y}.$$
Suppose that there were a second possibility $\widetilde{\mathrm{BCH}}(x,y) = \mathrm{BCH}(x,y) + z$. Then for any $u\in\mathrm{Lie}(x,y)$ we must have
$$\sum_{n\ge0}\frac{1}{n!}\left(ad_{\mathrm{BCH}(x,y)}\right)^n(u) = e^{ad_{\mathrm{BCH}(x,y)}}(u) = e^{ad_{\widetilde{\mathrm{BCH}}(x,y)}}(u) = \sum_{n\ge0}\frac{1}{n!}\left(ad_{\mathrm{BCH}(x,y)} + ad_z\right)^n(u)\tag{$\star$}$$
We will now prove that we must have $z\in Z(\mathrm{Lie}(x,y))$, which implies that $z=0$ since the free Lie algebra on two generators has trivial center. We write
$$z = z_1 + z_2 + \cdots$$, where $z_n$ is the part of $z$ consisting of bracketings of $n$ elements, and similarly for the other elements. So for example we have
$$x_1 = x\ ,\quad x_n = 0\quad\text{for }n\ge2\ ,\ \text{and}\quad\mathrm{BCH}(x,y)_2 = \frac{1}{2}[x,y]\ .$$

Lemma: We have $z\in Z(\mathrm{Lie}(x,y))$ if and only if $[x,z] = 0$ and $[y,z] = 0$.

Proof: One direction is obvious. The other is done by induction using the Jacobi rule, where the $n$th step consists in proving that $z_n$ is in the center if $z$ commutes with $x$ and $y$.

Proposition: The element $z$ is zero.

Proof: Using the Lemma, we only consider $u=x$ and $u=y$.
This is also done by induction. The equation $(\star)_1$ is automatically satisfied, since both sides equal $u_1 = u$. For $(\star)_2$, we get the constraint
$$[\mathrm{BCH}(x,y)_1,u] = [\mathrm{BCH}(x,y)_1,u] + [z_1,u]\ ,$$
which gives $[z_1,u] = 0$ and implies that $z_1$ is central by the Lemma. Thus, $z_1=0$.
Proceeding this way, from $(\star)_{n+1}$ we obtain the equation $[z_n,u] = 0$, which similarly implies $z_n=0$. Therefore, we conclude that $z=0$, which finishes the proof.
