Financial terms were not disclosed.
Yahoo will provide Web search services and paid search to Viacom's range of online properties including CBSNews.com, BET.com and MTV.com.
Web search is seen accounting for about 40 percent of all online ad spending in 2005, when total Web advertising is expected to grow 21 percent to $11.5 billion, research firm eMarketer said earlier this year.
U.S. media companies, facing paltry growth prospects as they compete against new technologies and a mature market, are aiming to boost growth by linking with Internet companies.
News Corp. (NWS), which has earmarked $2 billion for acquisitions, is expected to pay $580 million for Intermix Media, operator of social networking service MySpace.com.
News Corp. is the parent company of the Fox News Channel, which operates FOXNews.com.
About.com, which the New York Times Co. (NYT) bought for about $410 million earlier this year, was one of the company's advertising bright spots in the second quarter amid a shaky advertising environment.
Viacom is expected to split its high growth cable networks from its more mature cash-flow generating television and radio broadcast networks by early next year.