A popular explanation of this term is that it is a pirate phrase originating in Port Royal, Jamaica in the 1600s. Having only single-shot black powder weapons at once to keep up the fight. In addition they carried a knife in their teeth for maximum arms capability.
But contrary to most people’s idea that warriors with knives and daggers from the basis of this phrase, it actually has little to do with such fearsome feats.
To the teeth is a fourteenth-century phrase meaning fully and completley, rather like up to your neck.