The cash and shares transaction will be worth about €346m ($498m).
In a statement Maersk said it will earn a 31% stake in DFDS, and €170m in cash.
The shipping firm said it expects the deal to be completed in the second quarter of 2010.
The parties have also agreed to a lock-up period of 24 months on the DFDS shares from completion of the deal, Maersk said.
The company, to be formed by the combination of Norfolkline and DFDS, will have pro forma 2009 revenues of about €1.5bn and earnings before interest, tax, depreciation and amortisation of €139m, DFDS said.
Norfolkline Group has entered into an agreement with a different party for the sale of the vessels, Maersk Vlaardingen and Maersk Voyager, effective prior to completion of the transaction.