Emigration and Immigration
By 1850 Hamburg became next to Bremen the most important emigration port in Europe. Read all about emigrating through Hamburg by clicking on https://wiki.familysearch.org/en/Germany_Emigration_and_Immigration
A very important tool in tracing German immigrants can be the Hamburg Passenger List. Study how to use this resource by clicking here: https://wiki.familysearch.org/en/Hamburg_Passenger_Lists
Emigrants could have remained in Hamburg for a while. There was a Meldepflicht (obligation to register) in force since 1826, but became not mandatory until 1892. Foreigners and servants were registered and those in need of passports. Such records are available through the Family History Library Catalog under Place Search (Hamburg), Naturalization and citizenship (Heimatbücher 1826-1864), Population (Meldeprotokolle für Fremde 1868-1889) and Immigration (Reisepasskontrolle 1851-1929)
Schutzverwandtschaft (17th century-1811,1837-1864)
To receive the privilege of becoming a citizen (usually not full-status) in Hamburg required consent through the city council. People had to swear alligence, pay a yearly fee, report all suspicious actívities and could not transfer their privileges to their children.
The records are found in the State Archive Hamburg. Key words are Bürgerbücher, Bürgerprotokolle (1596-1902) as well as Heimatscheinprotokolle (1826-1872).