1560s, "freeman of a burgh," from Middle Dutch burgher or German Bürger, from Middle High German burger, from Old High German burgari, literally "inhabitant of a fortress," from burg "fortress, citadel" (from PIE root *bhergh- (2) "high," with derivatives referring to hills and hill-forts). Burgh, as a native variant of borough, persists in Scottish English (as in Edinburgh) and in Pittsburgh.
1610s, Hamburger "native of Hamburg." Also used of ships from Hamburg. From 1838 as a type of excellent black grape indigenous to Tyrolia; 1857 as a variety of hen.
The meat product was so called by 1880 (as hamburg steak); if it was named for the German city no certain connection has ever been put forth, and there may not be one unless it be that Hamburg was a major port of departure for German immigrants to United States. An 1809 account of life and manners in Iceland says meat smoked in the chimney there is referred to as Hamburg beef.
The meaning "a sandwich consisting of a bun and a patty of grilled hamburger meat" attested by 1909, short for hamburger sandwich (1902). Shortened form burger is attested from 1939; beefburger was attempted 1940, in an attempt to make the main ingredient more explicit, after the -burger had taken on a life of its own as a suffix (compare cheeseburger, attested by 1938).