We consider the half-wave maps equation $$ partial_t vec{S} = vec{S} wedge | abla| vec{S}, $$ where $vec{S}= vec{S}(t,x)$ takes values on the two-dimensional unit sphere $mathbb{S}^2$ and $x in mathbb{R}$ (real line case) or $x in mathbb{T}$ (periodic case). This an energy-critical Hamiltonian evolution equation recently introduced in cite{LS,Zh}, which formally arises as an effective evolution equation in the classical and continuum limit of Haldane-Shastry quantum spin chains. We prove that the half-wave maps equation admits a Lax pair and we discuss some analytic consequences of this finding. As a variant of our arguments, we also obtain a Lax pair for the half-wave maps equation with target $mathbb{H}^2$ (hyperbolic plane).