At the end of the Napoleonic Wars, Germany was made up of 39 states, including four city-states. After the abolition of its own internal tariffs in 1818, Prussia began to invite individual states to abolish tariffs, with the agreements that established the cornerstone of the customs association, which consolidated strong economic ties between the various Prussian and Hohenzollern regions and ensured economic contacts between the unrelated stocks of the Hohenzollern family. , including the Prussian family. It was created to remove the various obstacles (such as the different weights and measures in the German states) to economic exchanges and the growth of the new trade classes and to create a national unity in economic matters at a time when Germany was divided. Prussia was the main driver of the creation of the customs union. Austria was excluded from the customs association because of its highly protected industry and also because Colonel von Metternich was against the idea.  With the creation of Northern Germany in 1867, the customs association brooded states of about 425,000 square kilometres and had entered into economic agreements with several non-German states, including Sweden-Norway. After the founding of the German Empire in 1871, the Empire took control of the Customs Union. However, until 1888, not all states of the Empire were part of the customs association (z.B. Hamburg).
In contrast, Luxembourg, although Luxembourg was an independent state of the German Empire, remained in the customs association until 1919.  In 1820, Wurtemberg planned the creation of a customs union under the so-called third Germany: the medium-sized states, including itself, Baden-Wuerttemberg and the two states of Hesse-Darmstadt and Hesse-Kassel. This customs union excluded austria as well as Prussia, not least because the two great German powers were considered too presumpinous. The plans failed because of the divergent interests of the states concerned. While economic development in Baden, with its long borders and entrenched commercial infrastructure, has gone relatively well, Bavaria`s economic development has been lagging far behind and the Bavarian regime has imposed a safeguard right for products outside the border. The result was a short-lived trade agreement between Baden and Hesse-Darmstadt. Nevertheless, a second agreement, reached in Stuttgart in 1825, established a relationship between Wurtemberg and Bavaria with the creation of the Customs Union of South Germany. Unlike Prussian activities, Hanover, Saxony, Hesse and other countries (Austria, France, Great Britain and the Netherlands) have developed their own economic agreements. While they promised each other not to join the Prussian Union, they developed their own trade agreements. The Union failed because it was only trying to maintain the status quo and not to solve the problems caused by toll barriers. In 1834, Baden and Wuertemberg joined the Prussian Union, renamed the German Customs Union.
The tax association was founded in 1834 as a customs union first of the Duchy of Brunswick and the Kingdom of Hanover, then in 1836 with the Grand Duchy Oldenburg. The original customs union did not end in 1866 with the outbreak of the Austro-Prussian War, but in 1867 a major reorganization was born. The new customs association was stronger because no state had a veto.  When Hamburg joined the customs union in 1888, it negotiated the exemption of 4 square miles in the centre of its port, which remained outside the customs association.