After the French Revolution in 1789; in 1792 a republic was declared and King Louis XVI was executed. In 1792 there began several Revolutionary wars and then the Reign of Terror with Robespierre and the Jacobins, revolutionaries who believed in a republic, ruled France until 1794. After the fall of the Reign of Terror, the Directory, composed of five executive directors, assumed control until 1799 when it was replaced by the Consulate with Napoleon Bonaparte.
Bonaparte ruled as emperor until he was forced to abdicate and was exiled to Elba in 1813. For 100 days after this exile of Napoleon, the Bourbon king was restored; this was Louis XVIII. After 100 days, Napoleon escaped from Elba and returned to power, but was defeated at the battle of Waterloo in 1815.
Now, these facts relate to the novel in several ways. Since the monarchy has been restored, anyone who was a supporter of Napoleon was suspect and considered a traitor. In the first chapter of The Count of Monte Cristo, the unsuspecting Edmund Dantes has been seen by Danglars delivering a letter to Elba, so Dantes is implicated as a Bonapartist (a supporter of Napoleon). Danglars does this in the writing of the letter that brings about Dantes's arrest.
Because the Deputy Prosecutor, de Villefort is a Loyalist (a supporter of the king), he would treat a Bonapartist as a traitor. This is one reason why he detains Dantes rather than letting him go after he is brought in. Also, he tries to ingratiate himself with the Loyalists such as his wife's parents', Monsieur and Madam de Saint-Meran; and, he makes every effort to hide the affiliations of his father, Monsier Moitier, a Bonapartist who is involved in the restoration of Napoleon to power in 1814. The letter to be delivered by the sea captain of the Phaeton to Napoleon was written by noe other than M. de Noitier. Thus, de Villefort's anxiety about the de Saint-Merans' learning of his father's real name as well as his affiliations with Napoleon are the reason why he has Dantes put into prison during this time period known as the One Hundred Days: March 1, 1815--June 18, 1815