Wal-Mart is withdrawing from South Korea after agreeing to sell its business to the Asian country's leading retailer Shinsegae for KRW825bn (US$882m).