Les Miserables translates roughly as “The Downtrodden.” Fantine is one of these downtrodden, a young working-class grisette who hides her out-of-wedlock child to obtain respectable employment. When her secret is discovered, she is thrown out of the factory. In desperation, she sells her hair and her teeth, and finally, reluctantly, she sells sex. (Incidentally, she may not be the only major character in the novel who is involved in the sex trade: It is implied several times in the novel that when M. Thenardier involves Eponine in his criminal exploits that this includes pimping her out.)
A contemporaneous researcher surveyed Parisian sex workers, and while he goes on at length about his own prejudices, he also gives some data, including reasons cited for getting involved in sex work. This data doesn’t really confirm his biases,which might indicate its validity, at least insofar as he believes laziness, vanity, parental “corruption” and women forgetting “their most sacred of duties” (huh?) are to blame for prostitution. In any case, Fantine’s story (“brought to Paris and abandoned by soldiers, clerks, students, etc.”) was commonly cited—by a little less than 10% of respondents—and the bulk of the rest were orphaned, or kicked out/ran away from home. The single most commonly cited reason for turning to sex work, though, was poverty (i.e. doing it for the money, duh).
Today, many confused feminist commentators, including Anne Hathaway, refer to the character as someone caught in “sexual slavery,” linking Fantine’s plight to the term “sex trafficking.” But Fantine is not a sex trafficking victim and to call her such is to profoundly miss the point of the story. In fact, the co-option of a survival sex worker’s story to fit an agenda that leads to the oppression of all sex workers is itself exploitative. You might note, as quoted in the article linked above, that Victor Hugo also refers to Fantine as a slave, but I believe this is more clearly metaphorical on his part, since he explicitly names “hunger,” “cold,” “loneliness,” “abandonment,” and “privation” as the “slavers.” Interestingly, Hugo himself was rather well known for his sexual exploits with his wife, long-term mistress, short-term mistresses, his maids, and, yes, with many sex workers. So, Hugo was himself a client–a fact which those who would use Les Miserables as an anti-trafficking text are presumably unaware.