Wal-Mart Stores Inc is losing two top e-commerce executives at a time the world's largest retailer is trying to step up online competition with the likes of Amazon.com Inc .

Wal-Mart said on Tuesday that Vice Chairman Eduardo Castro-Wright, head of the e-commerce and sourcing business at Wal-Mart, will retire on July 1 to spend more time with his family.

In separate news, Nestle named Wal-Mart's executive vice president of global e-commerce for emerging markets as its new chief financial officer. Wang Ling Martello, who has also worked with Kraft Foods Inc , will join Nestle on April 1.

The departures comes some six weeks after Wal-Mart said it was shaking up its e-commerce structure as it aims to build up its online business. Wal-Mart has had a Web presence for years, but still lags behind competitors in terms of recognition.

Online sales are an important growth strategy for Wal-Mart, which has seen sales at its U.S. discount stores open at least a year fall for two years.

In August the company changed its e-commerce structure, putting the people who run stores in developed markets such as the United States in charge of the websites in those countries. That change included the departure of two other e-commerce executives.

Wal-Mart said on Tuesday it aims to name new leadership for the e-commerce and sourcing businesses by the end of January, after which Castro-Wright will assist in the transition.

Castro-Wright moved to California last year from Wal-Mart's home town of Bentonville, Arkansas to be with his wife, who had a heart transplant.

Castro-Wright joined Wal-Mart in 2001 as chief operating officer of its business in Mexico. He was named president and chief executive of Walmart U.S. in 2005 and took on his current position in August 2010.

Wal-Mart shares closed up 20 cents, or 0.4 percent, at $52.03 on the New York Stock Exchange.

(Reporting by Martinne Geller; Editing by Richard Chang, Bernard Orr, Phil Berlowitz)