  The Hodge correlators ${\rm Cor}_{\mathcal H}(z_0,z_1,\dots,z_n)$ are
functions of several complex variables, defined by Goncharov (arXiv:0803.0297)
by an explicit integral formula. They satisfy some linear relations: dihedral
symmetry relations, distribution relations, and shuffle relations. We found new
second shuffle relations. When $z_i\in0\cup\mu_N$, where $\mu_N$ are the $N$-th
roots of unity, they are expected to give almost all relations. When $z_i$ run
through a finite subset $S$ of $\mathbb C$, the Hodge correlators describe the
real mixed Hodge-Tate structure on the pronilpotent completion of the
fundamental group $\pi_1^{\rm nil}(\mathbb{CP}^1-(S\cup\infty),v_\infty)$, a
Lie algebra in the category of mixed $\mathbb Q$-Hodge-Tate structures. The
Hodge correlators are lifted to canonical elements ${\rm
Cor_{Hod}}(z_0,\dots,z_n)$ in the Tannakian Lie coalgebra of this category. We
prove that these elements satisfy the second shuffle relations. Let
$S\subset\overline{\mathbb Q}$. The pronilpotent fundamental group is the Betti
realization of the motivic fundamental group, a Lie algebra in the category of
mixed Tate motives over $\overline{\mathbb Q}$. The Hodge correlators are
lifted to elements ${\rm Cor_{Mot}}(z_0,\dots,z_n)$ in its Tannakian Lie
coalgebra $\rm Lie_{MT}^\vee$. We prove the second shuffle relations for these
motivic elements. The universal enveloping algebra of $\rm Lie_{MT}^\vee$ was
described by Goncharov via motivic multiple polylogarithms, which obey a
similar yet different set of double shuffle relations. Motivic correlators have
several advantages: they obey dihedral symmetry relations at all points, not
only at roots of unity; they are defined for any curve, and the double shuffle
relations admit a generalization to elliptic curves; and they describe elements
of the motivic Lie coalgebra rather than its universal enveloping algebra.
