The story
The phrase was initially rendered as dont tread on me, without apostrophe, as dont was then an accepted contraction of do not. In some later versions, due to standards for apostrophes becoming more strict since the 18th century, the first word was changed to don't.
Etymology from Wiktionary, CC BY-SA 4.0.