Yes, this is the so called Grothendieck-Teichmuller theory. The reference is the paper of Drinfeld, "On quasitriangular quasi-Hopf algebras and a group closely related to $Gal(\bar Q/Q)$".

Following Grothendieck, the idea is the following: let $M_{0,n}$ be the moduli space of Riemann spheres with $n$ marked points. The absolute Galois group acts on the profinite completion $\hat T_n$ of the fundamental group of $M_{0,n}$. In particular, $M_{0,4}$ is isomorphic to $\mathbb{P}_1-${$0,1,\infty$}' whose fundamental group is the free group $F_2$. This is the first action you mention.

The point is to look at the action of $Gal(\bar{Q}/Q)$ on the whole "tower" of the $\hat T_n$, i.e. simultaneous actions on the $\hat T_n$ compatible with morphisms induced by natural geometric operations like adding or removing marked points.

So far I know, KZ equations are not quite related to string theory but rather to conformal field theory. But anyway, they leads to "universal" representations of the braid groups which are closely related to the $\hat T_n$. Drinfeld gives an algebraic description of these representations by introducing objects called "associators", which satisfy complicated equation expressing somehow a notion of compatibility with these natural geometric operations. He uses this machinery to define a rather "explicit" group (i.e. defined by explicit but very complicated algebraic equations) over which the set of associators is a torsor, called the Grothendieck-Teichmuller group, which is a subgroup of $Aut(\hat F_2)$ containing the image of $Gal(\bar Q/Q)$ through the morphism induced by its action on the $\hat T_n$. It is well known that this map is injective, and so far I know it is a plausible conjecture that these two groups are actually equal.