Adverts
From October, MySpace users will be able to use Google to search for groups and friends through the site.
Google will also provide text-based adverts triggered by keywords found on the websites.
The deal ends speculation about which search engine would serve MySpace. Yahoo and MSN were also reported to have been vying for the right.
MySpace was bought by Rupert Murdoch's News Corporation in July last year.
President of Fox Interactive Media Ross Levinsohn said that 250,000 people were joining MySpace each day.
The site was approaching the 100 million user profiles, he said.
Earlier this week, Google struck a deal with MTV to distribute video footage from the music station to websites and blogs.