The deal, which Walmart will use to bolster its online offerings, has been approved by both companies' boards of directors and is expected to close in the second half of this year.
Part of the $3bn cash deal and $300m of Walmart shares will be paid over time, Walmart and Jet.com said in a joint statement.
Walmart said the acquisition will "build on and complement the significant foundation already in place to serve customers across the Walmart app, sites and stores and position the company for even faster e-commerce growth in the future".
Jet.com is one of the fastest growing e-commerce companies in the US. Founded in 2015, in its first year its run-rate gross merchandise value reached $1bn and added more than 400,000 new shoppers on a monthly basis.
Walmart president and chief executive Doug McMillon said: "We're looking for ways to lower prices, broaden our assortment and offer the simplest, easiest shopping experience because that's what our customers want.
"We believe the acquisition of Jet accelerates our progress across these priorities. Walmart.com will grow faster, the seamless shopping experience we're pursuing will happen quicker, and we'll enable the Jet brand to be even more successful in a shorter period of time.
"Our customers will win. It's another jolt of entrepreneurial spirit being injected into Walmart."
Walmart and Jet.com will maintain distinct brands, with Walmart.com focusing on delivering the company’s Everyday Low Price strategy, while Jet will continue to provide a unique and differentiated customer experience with curated assortment.
“We started Jet with the vision of creating a new shopping experience,” co-founder and chief executive Marc Lore said.
“Today, I couldn’t be more excited that we will be joining with Walmart to help fuel the realisation of that vision. The combination of Walmart’s retail expertise, purchasing scale, sourcing capabilities, distribution footprint, and digital assets – together with the team, technology and business we have built here at Jet – will allow us to deliver more value to customers.”