Lord Hornblower, by C. S. Forester.
Returning from sick leave, Hornblower must quash a mutiny off the coast of France (very sneakily he does it, too), which then turns into inciting the town La Havre to rebel against Bonaparte (successfully) and attainment of a peerage. A brief interlude of peace ensues. Trapped in France after Napoleon escapes from Elba, Hornblower fights as a guerilla with his old friend the Comte de Gracay, loses Marie, and is sentenced to death.
Fortunately, Bonaparte's return does not last.