Chad Rubin began selling vacuum cleaner parts on Amazon.com Inc. in 2008 and turned it into a multimillion-dollar business. But in recent years, Rubin has found it increasingly difficult to compete on the cluttered site, where he has been forced to buy advertising that cuts into his profit. Last year, he decided to shift some of his business to an up-and-coming website where it's easier and cheaper to stand out: Walmart.com.

"Amazon sells 25,000 different kinds of toilet paper holders," says Rubin, who is actually undercounting a product with more than 70,000 search results on the site. "How do you win and differentiate in that environment?" In the last year, thousands of merchants like Rubin have answered that question by signing on with Amazon's biggest rival.

The notion of Amazon merchants selling through Wal-Mart Stores Inc. would have been risible just a few years ago. But much has changed. Wal-Mart's struggling e-commerce operations have shown signs of life since the company acquired startup Jet.com last year and put its cofounder, Marc Lore, in charge. Meanwhile, among merchants, Amazon has earned a reputation as a demanding and cranky landlord, kicking sellers off its marketplace when customers complain and reaching deeper into their pockets with steeper fees and new advertising products that merchants say are now required to get a sale.