The expression “to tilt at windmills” means to wage battle with chimeras; to take up the cudgels against an imaginary wrong or evil.
The saying and its meaning take us to the redoubtable knight, Don Quixote, in the book of that name by Cervantes in 1605.
The eighth chapter, Vol. I, begins: “At this point they came in sight of thirty or forty windmills, and as soon as Don Quixote saw them he said to his squire, ‘Fortune is arranging matters for us better than we could have shaped our desires ourselves, for look there, friend Sancho Panza, where thirty or more monstrous giants present themselves, all of whom I mean to engage in battle and slay, and with whose spoils we shall begin to make our fortunes; for this is righteous warfare, and it is God’s good service to sweep so evil a breed off the face of the earth.'”
Whereupon, despite the protestations of his squire, the resolute knight couched his lance, urged forward his good steed, Rosinante, and hurled himself at the arms of the nearest windmill.
Clinging to the lance, he was lifted by the sail, until he dropped with a shattering thud to the earth, and had nothing but his pains for the effort.