On September 7, 1813, according to the most cited—and
Congressionally approved—account, the United States
got its nickname, Uncle Sam. The name is linked to Samuel
Wilson, a meat packer from Troy, New York, who supplied
barrels of beef to the United States Army during the War of
1812. Wilson (1766-1854) stamped the barrels with “U.S.”
for United States. But because Wilson was known locally
as "Uncle Sam," soldiers began referring to the grub as
“Uncle Sam’s.”
The local newspaper, the Troy Post, picked up on the story
and Uncle Sam eventually gained widespread acceptance
as the nickname for—and personification of—the U.S.
federal government.
Scholars have uncovered a handful of earlier references linking
the U.S. to the nickname Uncle Sam, but the Troy Post origin
story has stuck as the official one.