1810, "member of a gang of murderers and robbers in India who strangled their victims," from Marathi thag, thak "cheat, swindler," Hindi thag, perhaps from Sanskrit sthaga-s "cunning, fraudulent," from sthagayati "(he) covers, conceals," from PIE root *(s)teg- "to cover."
The thugs roamed about the country in bands of from 10 to 100, usually in the disguise of peddlers or pilgrims, gaining the confidence of other travelers, whom they strangled, when a favorable opportunity presented itself, with a handkerchief, an unwound turban, or a noosed cord. The shedding of blood was seldom resorted to. The motive of the thugs was not so much lust of plunder as a certain religious fanaticism. The bodies of their victims were hidden in graves dug with a consecrated pickax, and of their spoil one third was devoted to the goddess Kali, whom they worshiped. [Century Dictionary]
The more correct Indian name is phanseegur (from phansi "noose"), and the activity was described in English as far back as c. 1665. Rigorously prosecuted by the British from 1831, they were driven from existence by century's end. Transferred sense of "ruffian, cutthroat, violent lowbrow" is from 1839.