Jean Valjean does not kill Javert because he knows that whatever Javert has done to him, whatever Javert might wish on him, killing him is the wrong thing to do. Valjean spent years in prison for stealing a loaf of bread, and he spent the years after his imprisonment running from the law—and running from Javert specifically. While killing Javert would end Valjean's years of running and hiding, the murder would hang over him forever.
Valjean is also emulating Bishop Myriel, who could have had Valjean arrested for stealing from him. Though the law technically dictated that Valjean should have been arrested, Myriel chose instead to defend Valjean and give him the silver. This generous act allowed Valjean to change his life and become a good man. When Valjean spares Javert, he is following the example set by the bishop by acting selflessly. While the generous act allowed Valjean to turn his life around, however, it makes Javert question his dedication to the law, which ultimately leads to his suicide.