We consider scalar conservation laws with convex flux and random initial data. The Hopf-Lax formula induces a deterministic evolution of the law of the initial data. In a recent article, we derived a kinetic theory and Lax equations to describe the evolution of the law under the assumption that the initial data is a spectrally negative Markov process. Here we show that: (i) the Lax equations are Hamiltonian and describe a principle of least action on the Markov group that is in analogy with geodesic flow on SO(N ); (ii) the Lax equations are completely integrable and linearized via a loop-group factorization of operators; (iii) the associated zero-curvature equations can be solved via inverse scattering. Our results are rigorous for N -dimensional approximations of the Lax equations, and yield formulas for the limit N → ∞. The main observation is that the Lax equations are a N → ∞ limit of a Markovian variant of the N -wave model. This allows us to introduce a variety of methods from the theory of integrable systems.MSC classification: 35R60, 37K10, 60J35, 60H99, 82C99, 35L67