The acquisition is valued at around $1.5bn (£1.15bn), including debt, and is the biggest deal by Dentsu since it took over Aegis in 2012.
The deal is part of Dentsu Aegis’ strategy to become 100% digital by 2020 and Merkle will retain its brand within Dentsu.
Merkle’s chief executive, David Williams, will retain a significant minority interest in the company, as well as his management team and employees.
The global agency, headquartered in Maryland, specialises in online tech that analyses individual consumer data. It generated revenue of $436m last year, an increase of 14% on 2014.
The company has 650 clients and employs more than 3,400 people across 21 offices – 16 in the US, two in the UK (London and Bristol), as well as Barcelona, Shanghai and Nanjing.
The transaction, which is subject to closing conditions, is expected to be completed before the end of September. Dentsu will acquire the majority stake from Technology Crossover Ventures, the US venture capital company, and other shareholders.
Jerry Buhlmann, chief executive of Dentsu Aegis, said: "The growth of the digital economy is one of the few certainties in an uncertain world. Merkle brings a powerful range of data-led, fully addressable and real-time capabilities.
"The combination of our two businesses will create a compelling offer in that context for existing and potential clients."