macaroni (n.) Look up macaroni at
"tube-shaped food made of dried wheaten paste" [Klein], 1590s, from southern Italian dialectal maccaroni (Italian maccheroni), plural of maccarone, name for a kind of pasty food, possibly from maccare "bruise, batter, crush," which is of unknown origin, or from late Greek makaria "food made from barley."

Used by 1769 to mean "a fop, a dandy" ("typical of elegant young men" would be the sense in "Yankee Doodle") because it was an exotic dish at a time when certain young men who had traveled the continent were affecting French and Italian fashions and accents. There is said to have been a Macaroni Club in Britain, which was the immediate source of this usage in English.