Walmart will integrate Google Express, which already lets people purchase products from a large range of brands.
The deal will make the retailer's products available on Google Express, and follows Amazon's announcement that it plans to acquire supermarket chain Whole Foods.
"Starting in late September, we'll be working with Google to offer hundreds of thousands of items for voice shopping via Google Assistant -- the largest number of items currently offered by a retailer through the platform," Marc Lore, Walmart's head of e-commerce, said in a blog post late Tuesday.
Walmart will integrate Google Express, which already lets people purchase products from a large range of brands, such as Costco and the pharmacy Walgreen's, into its own platform.
"If you're an existing Walmart customer, you can choose to link your Walmart account to Google and receive personalized shopping results based on your online and in-store Walmart purchases," Google said in a statement.
Walmart's third-quarter results, released this month, once again highlighted its persistent lag behind Amazon, even if the numbers were better than expected.
Walmart US, the biggest division at Wal-Mart Stores, posted a 1.8 percent rise in comparable sales in the second quarter from the year earlier, with revenues rising 2.1 percent to $123.4 billion.
But net income fell 23.2 percent to $2.9 billion, reflecting more aggressive spending on e-commerce and a willingness to compete by lower prices, as well as costs of $788 million connected to a debt payment.
Walmart holds the biggest share of the US grocery market of any retailer, with a network of nearly 4,700 stores that the company says are located within 10 miles of about 90 percent of the US population.
But it has faced increasingly stiff competition from Amazon, which is set to ramp up to a new level with the tech giant's impending purchase of Whole Foods Market.
According to Internet Retailer, citing figures from the Department of Commerce, Amazon accounted for 38 percent of all online sales in the second quarter and contributed to half of all growth in US internet commerce over the period.
But it remains behind Walmart when it comes to US distribution as a whole, with the two companies accounting for 2.8 percent and 6.3 percent of the market respectively last year.
Walmart has made several acquisitions in recent years to try to catch up, including the purchase of Jet.com last year for about $3 billion.
It has also started to deliver groceries in some cities via partnerships with Uber and Lyft.
Google is also looking to expand its activities in online shopping, grouped together under its Google Home brand.
Under the new partnership, shoppers can make purchases via voice-enabled Google Home devices, as Amazon does with its Alexa-enabled Echo devices.