Tread on a worm and it will turn (sixteenth-century proverb)
Jane of Lantern Hill, chapter 4 (“For the first time the worm turned”).
Sources
“worm turns, the”: Ammer, Christine. The American Heritage Dictionary of Idioms. Second edition. Boston and New York: Houghton Mifflin Harcourt, 2013.