In the final weeks of the war, Germany was forced to abandon the U-boat campaign as a requirement for a cease-fire. "Hamburg" was not interned in Scapa Flow under the terms of the armistice that ended the fighting, and she remained in Wilhelmshaven during the peace negotiations that ultimately produced the Treaty of Versailles. The "Führer der Torpedoboote" and his staff came aboard the ship in February 1919. Following the signing of the treaty in June 1919, "Hamburg" was taken into the "Reichsmarinewerft" in Wilhelmshaven and was decommissioned there on 16 August.