HMV has owned the Waterstone's chain since 1998, but the media planning and buying was managed by two separate agencies.
OMD, which has held the HMV account for a decade, will now handle the £24m consolidated account for both HMV record stores and Waterstone's booksellers.
The agency beat Omnicom sister agency PHD, the incumbent for Waterstone's, as well as Publicis-owned Starcom and WPP-owned MediaCom, to pick up the merged account in the UK.
HMV marketing director Graham Sim said the account would include digital planning and buying for the first time, which was previously handled in-house by both HMV and Waterstone's.
Sim said: "I am very excited by the prospect of one agency managing the media requirements of two such powerful brands, including, for the first time, online, and the significant potential synergies this will help to bring about."
HMV's combined online display account is worth about £700,000, according to Nielsen Media Research, but there is no figure for the company's spend on below-the-line search advertising.
Last year's offline spend was £18.7m for HMV and £5.3m for Waterstone's, according to Nielsen Media Research.
The Waterstone's account will move across to OMD this summer, after eight years at PHD.
Neil Jewsbury, commercial director at Waterstone's, said PHD had given "great service", but he was hopeful Waterstone's would benefit from closer integration.
It is understood that campaigns for HMV and Waterstone's would still be planned separately.
HMV has 200 stores nationwide and 366 in eight countries across Europe, North America and Pacific Asia, while the group has 193 Waterstone's stores mainly in the UK and Ireland.
HMV, like all high-street record stores, has come under pressure from the boom in online music, including both illegal file sharing and the burgeoning legal download market.