It didn't; not directly, anyway. He was a failed military dictator and mass murderer but the Allies had no intention of executing him for two main reasons.
First, there was no concept of war-criminality nor of reparations at that time so there was no legal way to kill him since he did not die in battle. What was more important was to avoid the creation of a martyr. Many of Bonaparte's policies were beneficial to Europe as a continent and would lead over the next 75 years to further movements for liberation and the recognition of nationalism. His execution would have led to uprising in some of the new states, and possibly to another European war.
Secondly, he was guilty only of the same "crimes" as other military leaders of the day and it was not considered viable to put him on trial unless the same happened to generals and monarchs in Spain, Italy, Germany and so on. His trial would have shown up all these others in the same light.
He was finally exiled to St Helena late in 1815 and lived there until he died in 1821 at the age of 52. The cause of his death was recorded as stomach cancer, after autopsy. His father had died of the same condition and it is known to be linked in families by heredity. However, French Republican sentiments have always wished to blame the British for his death by poisoning and there are many theories to this effect.
During the early part of this decade, micro analysis of some of his hair was carried out in Paris and a high concentration of arsenic was found to be present. There have been numerous explanations including the presence of that element in the patterned wallpaper of Longwood House which had been specially rebuilt and decorated for his occupation. The most likely explanation, if he was poisoned, is that the French Monarchist community infiltrated Longwood House [he had many visitors] and he was despatched as revenge for his treatment of the Bourbon-Capet family during his own reign.
The wiki below should not be taken as highly accurate. It is written as a tribute to Napoleon, and does not seek to explain many of his actions nor the cause of his death.

Report Abuse