Cotgrave, in his Dictionaire of the French and English Tongues, published in 1611, shows us that we are still using, by translation, an expression known to the French more than three centuries ago.
The same saying in Dutch is used in the Netherlands and can be traced there back to the Middle Dutch. The phrase “to get the sack” meant, in all cases, to be dismissed (or to dismiss one) from employment.
Because the expression goes back to the Middle Ages, the theory has been advanced that the “sack” was one in which an itinerant worker carried his tools and, if his work were unsatisfactory, he would receive notification thereof by the return of his sack by his employer.
That explanation would carry the implication that it was the custom for all workmen to leave their tools lying around unprotected, which is highly improbable. It would also imply that the craft guilds had sent forth an unprepared master workman.
Evidence is lacking, but I think it probable that the “sack” of the Middle Ages was always figurative, that it alluded to the ancient Roman punishment of putting a condemned person into a sack and drowning him in the Tiber. That form of punishment was common throughout Europe in the Middle Ages and persisted in Turkey until the nineteenth century.
The figurative usage may have begun as a threat of fatal punishment, just as today we “fire” an employee when he is discharged, likening him to the bullet sent away, or fired, or discharged from a gun.