Les Misérables (1862) is a sprawling epic by Victor Hugo, the seeds of which can be found in some of his earlier, shorter works, such as his novel(la) Le Dernier Jour d'un Condamné, which also treats upon the subject of the penal system in 19th century France and includes a character that resembles what could later be called an AU-style Valjean. An enduringly popular story and one among the most well known of French Literature worldwide, it has been adapted to the small and big screen numerous times, and was made into an English language musical play that has run for nearly fourty years.
As usual for one of Hugo's sprawling epics, it consists of the interweaving stories of many different characters, but the story that holds it all together opens with a recently paroled man named Jean Valjean arriving on foot in Digne, France, come from the shore-prison at Toulon where he's spent the past nineteen years. He was a desperately poor peasant from Brie who constantly worked — constantly, no matter how hard the labor or menial the task — to support his sister and her seven children. One especially bad winter, as the eighteenth century was drawing to a close, when he was 26, Valjean could not find work and, in an act of real need as much for his family as himself, he broke into a bakery and stole a loaf of bread.
For that, he was condemned to five years hard labor in a bagne (penal colony), a brutal, dehumanizing penal system that was par for the course at the time. Before his imprisonment, he was kind, of an even personality, and, in his own words, dull like a block of wood. Nineteen years in the galleys — nineteen instead of five, for all of his escape attempts — changed him completely, making him bitter, harsh, and incapable of relating to other human beings as friendly agents. The system at the time made it virtually impossible to be re-integrated into society; the only real way out was death, and the provisions of the law facilitated that: on one's third offense, the death penalty was automatically imposed. However, it was impossible for convicts to make an honest living, because no one would give them work. It was a dreadful double bind. This is the situation Valjean finds himself in when he is finally released. He is set on the fastlane to being sent back again when a meeting with an unconditionally kind man, who happens to be a bishop, changes him forever, for a second time, just as profoundly as his experiences in the bagne changed him.
And that's just the beginning.
He breaks his parole and commits a minor theft out of habit, beginning the book-long chase with Inspector Javert as the pursuer. Over the course of the book, with the inspector always right behind him, Valjean becomes mayor of a small seaside town due to the penchant for altruism he developed after his redemption; makes a fortune from his own ingenuity and innovation; does many philanthropic works, among them caring for a dying woman, one of his factory workers, and promising her to ensure the well-being of her daughter Cosette; reveals his identity in court to prevent the wrongful incarceration of another man who was mistaken for him; is captured and sent to the galleys, but escapes to keep his promise; adopts the waifish Cosette, and moves from town to town with his final stop as Paris, where he puts forth every effort he can to make sure that Cosette has the happiness he could not and, one might argue, achieves a transcendental niceness that might save everyone he meets, including this annoying lad who seems to be developing an interest in Cosette (and who has his own history).
But that niceness may be put to a different test entirely, because by 1832, as Cosette comes of age, a great many other people in France have had just about enough of the very same system that so traumatized Valjean all those years ago, and the crusade of change may be about to sweep over all our dramatis personae...
For the many adaptations, see here.