Abstract We consider systems of ODEs with the right hand side being Laurent polynomials in several non-commutative unknowns. In particular, these unknowns could be matrices of arbitrary size. An important example of such a system was proposed by M. Kontsevich. We prove the integrability of the Kontsevich system by finding a Lax pair, corresponding first integrals and commuting flows. We also provide a pre-Hamiltonian operator which maps gradients of integrals for the Kontsevich system to symmetries