The five-year agreement will leverage the full range of Microsoft's cloud solutions, including Microsoft Azure and Microsoft 365, to make shopping faster and easier for customers, the Bentonville Arkansas-based company said.
As part of the partnership, Walmart and Microsoft engineers will collaborate to migrate a significant portion of walmart.com and samsclub.com to Azure, Walmart added.
While Walmart is doubling down on its e-commerce presence to better compete with Amazon, Microsoft has been working on a technology that would eliminate cashiers and checkout lines from stores.
Microsoft's technology aims to help retailers keep pace with Amazon Go, the ecommerce giant's highly automated store format.
The Windows software maker has also shown the sample technology to retailers from around the world and has had talks with Walmart about a potential collaboration.
Through the partnership, Walmart plans to defend itself from Amazon's retail ambitions and expertise in data, and boost its online presence.