Valjean realizes that with Javert back on his trail, he is lost if he goes back into the outside world. It is imperative that he remain in the convent. But even with Fauchelevent's loyal assistance, the difficulties are insuperable. He cannot wander very far in this community of women. He cannot even stay hidden, for the convent has boarding students, whose tireless curiosity would soon betray the fugitives. Valjean's only hope is to be officially accepted by the nuns under some plausible alias. But to return in a normal way, he must first leave the convent undetected.
Both men fruitlessly examine the problem until Fauchelevent is summoned by the prioress. She gives him a confidential mission. A nun, Sister Crucifixion, has died that morning. Her last wish was to be buried in the vault under the altar. As this is against the law, a bit of subterfuge is required to carry out her request. The prioress asks Fauchelevent to come back before midnight, after the coroner's visit, to nail down the coffin and bury it in the vault. Later he is to accompany an earth-filled casket to the cemetery to throw the authorities off the track. As he listens to the instructions, Fauchelevent, who is not without peasant shrewdness, has been suggesting that he has a brother who could usefully help him in the garden and a niece who might become a nun if she were allowed to go to school at the convent. Satisfied with Fauchelevent's cooperation, the prioress gives him permission to bring his supposed brother and niece to the convent to live.
When Fauchelevent tells Jean Valjean what has just taken place, the ex-convict has a hair-raising idea. He himself will occupy the false casket, and at the cemetery Fauchelevent can get his friend Mestiennes, the gravedigger, drunk and free Valjean. As for Cosette, she will simply be carried out by Fauchelevent in a basket on his back.
The next day at sunset, Fauchelevent confidently follows the funeral procession to the Vaugirard cemetery. Everything is going well and Valjean's confident courage has reassured him. At the gate, an unexpected contretemps strikes him like a thunderbolt. He is greeted not by the alcoholic Mestienne but by a replacement, Gribier; Mestienne has just died. In his bewilderment, Fauchelevent can think of nothing better than to continue with the original plan, but the new gravedigger is a teetotaler and virtuously refuses Fauchelevent's repeated urgings to come and have a drink with him.
Valjean has weathered his ordeal well, has suffered stoically through the long procession, the descent into the grave, and finally the lugubrious funeral services. But when he hears the earth falling on the casket and understands its implications, he faints.
Above ground, desperation has brought inspiration to Fauchelevent. He has noticed a white card in the gravedigger's pocket, his pass to enter and leave the cemetery after sunset. Fauchelevent steals the pass skillfully, then brings the loss to his companion's attention. Gribier is terrified, for the loss incurs a large fine. Fauchelevent helpfully suggests he go home and look for it, offering to guard the grave. The grave-digger, overwhelmed with gratitude, shakes his hand and dashes away. Valjean is soon freed and the fake burial completed. The two men leave the cemetery without further difficulty.
An hour later, two men and a little girl present themselves at the gate of the convent. Valjean makes a good impression on the prioress, and Cosette's homeliness seems to predestine her to become a nun. Valjean is installed as assistant gardener and Cosette is accepted as a student. Life for Valjean is henceforth to be confined within the walls of the convent, but he is satisfied with it. His work gives him serenity, and he finds consolation in Cosette's daily visits. She too is happy. Laughter, like sunshine, dissipates the winter in her heart. In this fashion, several years go by.
Part Two as a whole has presented technical problems for Hugo. Its plot comprises only three events: Valjean's escape and rescue of Cosette; his flight from Javert; and his discovery of a new refuge in the convent. This is very little action to stretch over nearly 300 pages, and Hugo uses various devices to maintain the reader's interest: cumulative suspense, deliberate mystifications, and unexpected dramatic confrontations only later explained in flashbacks.
When Jean Valjean comes to the inn, there is no real reason why he cannot simply present Fantine's note and take Cosette away directly. Instead, Hugo has him approach the problem in a subtler manner so that for several chapters the reader does not know whether he will succeed in rescuing the child or not. Interest is sustained, and the rescue when it comes is much more emotionally satisfying.
Hugo also deliberately mystifies us at three points in Part Two. Valjean falls from the mast at Toulon, but it is a long time before we are quite sure that he has survived and made good his escape. Boulatruelle suspects a man of burying treasure in the woods, but again we do not know for sure that it is Valjean and that he has secreted the wealth he gained as M. Madeleine until much later in the book. And finally, the strange sights and sounds Valjean sees after he has climbed over the wall into the convent garden are deliberately chosen to alarm and puzzle us, and to pique our curiosity.
The flashback is a legitimate dramatic device, almost as old as the novel itself, and Hugo uses it here and in many other places in Les Misérables to good effect. To explain Javert's appearance immediately when he enters upon the scene would be to weaken all the dramatic effect of his irruption into Valjean and Cosette's peaceful life and would destroy the unity and steadily mounting suspense of the discovery-chase-escape sequence. As it is, crisis follows crisis until Valjean disappears over the convent wall; then, satisfied that he is safe, we are prepared to hear an explanation of Javert's presence.
The suspense in Chapter 8 is also very effectively maintained, and the working out of a complex criminal escape plot against the background of a convent also gives Hugo an opportunity for one of the dramatic contrasts both he and the reader enjoy.