The 21-gun salute that we know today has its roots in the ancient tradition of warriors demonstrating their peaceful intentions by resting the point of their weapons on the ground.
The notion of making a soldier’s weapons useless to show that he came in peace continued even as warfare changed over the centuries. Gunpowder and cannons became commonplace among militaries and private forces, both on land and at sea around the 14th century. In order for a ship entering a foreign port to show those on shore that they came in peace, the captain would have his crew fire the guns. This rendered the weapons inoperable for a period of time, with early guns only being capable of firing a single shot before crews needed to reload them.
Read more @ We are the Mighty