The deal represents a significant profit on the £103.5 million Mr Desmond paid for the broadcaster in 2010, although it is thought to fall short of the £700 million price tag he had put on the channel.
Northern & Shell said the deal was subject to regulatory approval.
Viacom chief executive Philippe Daumann said: "The acquisition of Channel 5 accelerates Viacom's strategy in the UK, one of the world's most important and valuable media markets."
Channel Five was launched in 1997 and broadcasts popular shows such as Neighbours. Under Mr Desmond it revived Big Brother after it was ditched by Channel 4.
The broadcaster's fortunes have been transformed since the tycoon, who also owns the Daily Express and Daily Star newspapers, bought it four years ago.
Its sale marks the first time a US broadcaster has taken control of one of the UK's five free-to-air channels.
Channel Five also includes the 5* and 5 USA channels as well as +1 variants showing them an hour later.
New owner Viacom is also behind children's channel Nickelodeon and Comedy Central.
Northern & Shell finance director Rob Sanderson said: "We are pleased to have agreed the sale of Channel 5 to Viacom.
"Since our acquisition of Channel 5 in 2010, the financial and operating performance of the business has been transformed and the combination of Channel 5 with Viacom's global resources, technology and expertise offers exciting opportunities for the channel's future."
Viacom said its acquisition brought it the only commercial public service broadcaster to grow viewer share consistently in recent years. It said Channel 5's programmes were viewed by 42 million people every month.
It said the business would "complement Viacom's popular pay TV networks" connecting with "focused and valuable audiences".
Mr Dauman said: "Channel 5's momentum is indisputable, with impactful programming, increasing popularity and a growing digital platform.
"Viacom's global resources, technology and expertise will help Channel 5 develop even more compelling programming and provide content to consumers in exciting new ways.
"In addition, we will introduce our popular content to new UK audiences and create a comprehensive offering for our commercial partners on-air and online."
Mr Dauman said the deal would "dramatically increase" Viacom's investment in programmes produced in the UK and it looked forward to "partnering with local producers to introduce more UK-created content to global audiences".
He said Viacom would "continue to explore opportunities in the UK, both in free-to-air and pay television markets".
Channel 5's chief operating officer, Paul Dunthorne, said the deal offered "numerous exciting opportunities for the channel's future".