British OriginsLike many of the songs that have become characteristic of American patriotism, the origins of "Yankee Doodle" lie in old English folk music. In this case, kind of humorously, the song emerged before the American Revolution as a vehicle for the British to mock American soldiers. Yankee, of course, began as a negative term making fun of Americans, although the exact origins of the word are debatable. "Doodle" was a derogatory term that meant "fool" or "simpleton."
The American RevolutionAs the Yankees began to take the British in the Revolution, they also took over command of the song, and began singing it as a proud anthem to taunt their English foes. One of the earliest references to the song was from the 1767 opera The Disappointment, and an early printed version of the song dates back to 1775, mocking a U.S. Army official from Massachusettes.
The American VersionAlthough the exact origins of the tune and original lyrics of "Yankee Doodle" are unknown (some sources attribute it to Irish or Dutch origin, rather than the British), most historians agree that the American version was written by an English doctor named Dr. Shackburg. According to the Library of Congress, Shackburg wrote the American lyrics in 1755.
The Civil WarConsidering the popularity of the melody, new versions evolved throughout America's early years, used to mock various groups. For example, during the Civil War, folks in the South sang lyrics mocking the north, and Union Democrats sang lyrics mocking the South.