information:filtering, information:classification, information:extraction, information:highlighting
Hugo's sources

An incident Hugo witnessed in 1829 involved three strangers and a police officer. One of the strangers was a man who had stolen a loaf of bread, similar to Jean Valjean. The officer was taking him to the coach. The thief also saw the mother and daughter playing with each other, which would be an inspiration for Fantine and Cosette. Hugo imagined the life of the man in jail and the mother and daughter taken away from each other.

Valjean's character is loosely based on the life of the ex-convict Eugène François Vidocq. Vidocq became the head of an undercover police unit and later founded France's first private detective agency. He was also a businessman and was widely noted for his social engagement and philanthropy. Vidocq also inspired Hugo's " Claude Gueux " and Le Dernier jour d'un condamné (The Last Day of a Condemned Man).

In 1828, Vidocq, already pardoned, saved one of the workers in his paper factory by lifting a heavy cart on his shoulders as Valjean does. Hugo's description of Valjean rescuing a sailor on the Orion draws almost word for word on a Baron La Roncière's letter describing such an incident. Hugo used Bienvenu de Miollis (1753–1843), the Bishop of Digne during the time in which Valjean encounters Myriel, as the model for Myriel.

Hugo had used the departure of prisoners from the Bagne of Toulon in one of his early stories, Le Dernier Jour d'un Condamné. He went to Toulon to visit the Bagne in 1839 and took extensive notes, though he did not start writing the book until 1845. On one of the pages of his notes about the prison, he wrote in large block letters a possible name for his hero: "JEAN TRÉJEAN". When the book was finally written, Tréjean became Valjean.

In 1841, Hugo saved a prostitute from arrest for assault. He used a short part of his dialogue with the police when recounting Valjean's rescue of Fantine in the novel. On 22 February 1846, when he had begun work on the novel, Hugo witnessed the arrest of a bread thief while a duchess and her child watched the scene pitilessly from their coach. He spent several vacations in Montreuil-sur-Mer.

During the 1832 revolt, Hugo walked the streets of Paris, saw the barricades blocking his way at points, and had to take shelter from gunfire. He participated more directly in the 1848 Paris insurrection, helping to smash barricades and suppress both the popular revolt and its monarchist allies.

Victor Hugo drew his inspiration from everything he heard and saw, writing it down in his diary. In December 1846, he witnessed an altercation between an old woman scavenging through rubbish and a street urchin who might have been Gavroche. He also informed himself by personal inspection of the Paris Conciergerie in 1846 and Waterloo in 1861, by gathering information on some industries, and on working-class people's wages and living standards. He asked his mistresses, Léonie d'Aunet and Juliette Drouet, to tell him about life in convents. He also slipped personal anecdotes into the plot. For instance, Marius and Cosette's wedding night (Part V, Book 6, Chapter 1) takes place on 16 February 1833, which is also the date when Hugo and his lifelong mistress Juliette Drouet made love for the first time.

A template for Hugo's novel was Les Mystères de Paris (The Mysteries of Paris), a serial novel of similar length that enjoyed great success on its appearance in 1842–43, by Eugène Sue. Les mystères, like Les Misérables, views contemporary Paris from the point of view of the downtrodden and criminal underclasses who had been little represented in novels up to the time and features the interventions of detectives and the indifference of aristocrats. Although socially progressive in tone, it is more sensationalist than Les Misérables and does not have the same breadth of moral vision.