A women named Fantine had been abandoned, with her young child Cosette, years earlier in Paris. She had made her way to this same small town and left her daughter in the care of a local corrupt innkeeper and his mean wife. Unlike the play where this couple was in some ways funny they were pure evil in the book. By working at a local plant owned by Valjean she is able to pay the innkeeper and his wife to take care of Cosette. Fantine doesn't know how bad it is for her daughter with these people. She loses her job in the factory and she is living on the street with no money to pay for her daughters care. She sells her hair and her front teeth to get money and then is forced to becomes a prostitute. She knows she can't continue this way as she is dying from a disease. She is arrested and taken to a hospital.
The mayor, Valjean, learns where she is and feels bad that she is in this trouble, having had to fire her, so he tries to help. He gets Cosette at the innkeepers, and they go to the hospital.
This story has many twists and turns. Before long Valjean is identified & imprisoned. This is such a shock to Fantine that she dies from it. Valjean escapes, but is recaptured, and sentenced to death. While imprisoned he saves a sailors life. He then fakes his own death by appearing to have drowned. He goes to get Cosette and they run.