"The acquisition of Hamburg Sud is in line with our growth strategy and will increase the volumes of both Maersk Line and APM Terminals," the chief executive of Maersk Line and the Maersk Group, Søren Skou, said in a statement.
Part of the family-owned Oetker Group, Hamburg Sud operates 130 container vessels and is the world's seventh largest container shipping line, with $6.73 billion (€$6.06 billion) in revenue last year.
The acquisition takes Maersk Line's global capacity share to 18.6 percent from 15.7 percent.
"Maersk Line expects to communicate further details following the approval of the sales and purchase agreement expected early in the second quarter of 2017," the company said, adding that it planned to complete the transaction by the end of next year.
The shipping industry is undergoing a wave of consolidation after suffering its worst downturn in six decades amid overcapacity and slumping global trade.
Japan's three largest shipping firms said in October they were merging their container businesses, and France's CMA CGM earlier this year bought Singapore-based container liner Neptune Orient Lines (NOL).
Hanjin -- South Korea's largest shipping company and once the world's seventh biggest -- filed for bankruptcy protection in August.