The acquisition, already cleared by US and EU authorities, is part of a consolidation move in the shipping industry where rates paid for freight have been tumbling.
"Maersk Line will acquire Hamburg Süd for EUR 3.7 billion on a cash and debt-free basis," the company said in a statement, adding it would "finance the acquisition through a syndicated loan facility."
The transaction has also been approved by Maersk Line's shareholders and the board of directors of the seller, the family group Oetker Group.
Maersk Line said it hoped to close the transaction by the end of 2017.
The US Department of Justice approved the proposed acquisition on March 23rd followed by the European Commission's approval on April 10th under undisclosed conditions.
Hamburg Süd, which controls 134 ships and employs more than 6,000 people, generated 5.64 billion euros in sales in 2016, while Maersk Line generated $20.72 billion.
Maersk estimates its global market share in container shipping should rise by 16.0 percent to 18.7 percent, with a fleet of 743 container ships.
The two companies expect to save between $350 and $400 million in the first two years through their synergies.
"By keeping Hamburg Süd as a separate and well-run company, we will limit the transaction and integration risks and costs while still extracting the operational synergies," CEO Søren Skou said in a statement, adding the acquisition would "create substantial value to Maersk Line already in 2019".
The maritime sector, faced with falling shipping rates, has been forced to consolidate in recent years, leaving just three alliances to run most of the business.
By leading a race to the largest ship size, Maersk has contributed to an overcapacity in the sector, which has badly hurt small operators.
READ ALSO: Maersk orders 11 'mega' container ships