The use of the name Uncle Sam for the United States has been common for more than a hundred years. No one knows for certain how it began, but there is an explanation that appeared in print about 1840, and may be true. A contractor named Elbert Anderson was supplying some goods to the United States Army during the War of 1818. On the barrels and boxes were stamped his initials E.A. and U.S. for the United States. Someone asked what those letters meant and he, for a joke, answered that he supposed they meant ‘Elbert Anderson and Uncle Sam’, meaning Samuel Wilson, an old gentleman who was the local inspector of army supplies. Whether this is how the use began, no one really knows but it soon spread over the country. After a while Uncle Sam was pictured as a tall slender old gentleman with thin beard, dressed in old fashioned clothes with a white or grey tall hat. Sometimes the clothes of Uncle Sam are made of American flag. Now this figure is recognized everywhere in the world as representing the United States.
Uncle Sam (Wikipedia)