Back in the sixteenth century, when pistols, like the small cannons or curtails, were loaded through the bore, the powder and shot were poured first into little paper cornucopias, to be ready for use.
Because these were identical in shape, though not in size, with the paper horns which grocers used for the goods which they sold at retail, the French gave the military cornucopia the same name, cartouche.
Both the device and its name were borrowed by the English army. Then English soldiers began giving their own versions of the pronunciation of the word, calling it cartage, cartalage, cartrage, and, later, cartredge and cartridge, among a variety of other forms.
For no good reason, the form cartridge was adopted by the majority of writers in the eighteenth century, and became the accepted spelling.