It seems like there was every reason to execute him. He was a product of the French Revolution that had executed the monarchs of France and countless others. Even if he wasn't guilty of treason and war crimes after losing the War of the Sixth Coalition, why wasn't he convicted after escaping from Elbe and launching the the Hundred Days campaign that ended with his defeat at Waterloo? That must have violated all sorts of treaties and oaths. I know they even executed his brother-in-law general Joachim Murat, so why not him?
First:
It seems like there was every reason to execute him. He was a product of the French Revolution that had executed the monarchs of France and countless others.
So was everyone else in France in 1814. The entire French government and military were either products of the Revolution or Napoleon's Empire. The Marshals who wrested control the Army away from Napoleon had, for the most part, spent the majority of their professional lives fighting for the Republic or the Empire. Ney, Masséna, Davout, etc. had all fought with distinction for the Revolution. Talleyrand, the chief negotiator on behalf of France after Napoleon's abdication, had been a fixture of French politics since 1789, managing to hold on to power despite not really being on anyone's side at all.
Executing Napoleon for the excesses of the Revolution (when he wasn't even in government until 1799, at which point most people credited him for ending the Revolution) would have sent a clear message that no-one in France was safe from reprisal, which naturally would have destroyed any hope of a negotiated peace. Further, while none of the crowned heads of Europe liked Napoleon or his government, they had all recognised it as the legitimate government of France by signing peace treaties with it at the end of the Revolutionary Wars. They couldn't execute him for being a warmonger or a conquerer, because such an action would open them up to the entirely reasonable criticism that they and their ancestors had been doing the exact same things for the last two hundred years. While there were abuses of what might be called international convention (such as the execution of the Duc d'Enghien), there wasn't really anything the allies could do about it since Napoleon's abdication was required for them to install Louis XVIII on the French throne.
why wasn't he convicted after escaping from Elbe and launching the the Hundred Days campaign that ended with his defeat at Waterloo?
The allies in 1815 actually did want to try this - the Prussians especially were minded to execute the Emperor, to say nothing of the reaction of the again-restored Louis XVIII. However, there was a problem: France, and most of Europe, had in 1815 realised precisely how far the allies were willing to go to roll back the changes wrought by the Revolution and the Napoleonic Wars. Louis XVIII did his best to abolish the representative mechanisms of the Napoleonic constitution (Napoleon had simply ignored them), and the Congress of Vienna seemed poised to redraw the balance of European power to benefit Austria, Prussia, Russia, and the Kingdom of France - the same powers that had dominated 18th-Century Europe. The ideals of national self-determination, the rights of man, and even representational government that the French Revolution had unleashed (even if the Republic and other European governments had only played lip service to those ideals) were clearly under threat as reactionary monarchies did their best to stamp them out. There was a feeling among European progressives that the clock was winding back, that all the hard fighting was going to turn out to be for nothing.
Napoleon, on his return, did his best to harness that anxiety, by making serious motions towards a redrawn French constitution with real checks on the power of the Emperor, and in general sought to align himself with progressives within France. This wasn't entirely successful, and didn't win him enough support to avoid an offensive war, but it did add a new spin on what we might call the Napoleonic legend. Napoleon became not a tyrant, but a fighter for freedom. Executing Napoleon in 1815 would carry with it a whole train of symbolism that the same action would not have carried in 1814. While most of the Allies didn't much care, the British, whose government was at least theoretically amenable to those ideals (if not their continental outbursts over the last 20 years), saw no reason to make Napoleon a martyr to future revolutionaries. Since it was the British Napoleon surrendered to, they chose a new exile: St. Helena. This prevented martyring the Emperor and represented a far more secure prison than Elba.
Sources:
Phantom Terror by Adam Zamoyski
The Legend of Napoleon by Sudhir Hazareesingh