* Shinsegae and E-Mart to gain $940 mln from Affinity, BRV
* Shinsegae and E-Mart to spin off, combine online business units
* E-Mart shares surge 15 pct, Shinsegae climbs 10 pct (Adds milestone in paragraph 5)
SEOUL, Jan 26 (Reuters) - South Korea's retailers Shinsegae and E-Mart said they were set to gain $940 million from private equity firms, hoping to capitalize on a surge in online grocery shopping and other e-commerce in one of the world's most wired countries.
With the funding from Affinity Equity Partners and BRV Capital Management, both Asia-based private equity funds, department store operator Shinsegae and supermarket affiliate E-Mart laid out ambitions to topple eBay as the country's leading e-commerce retailer.
"E-Mart is unrivaled in the online grocery market thanks to its quick delivery service," said Seo Jung-yeon, an analyst at Shinyoung Investment.
Shares in both firms soared to six-year highs on the preliminary deal with E-Mart jumping 15 percent to see its market capitalisation hit $7.7 billion while Shinsegae gained 10 percent to be valued at $3.2 billion.
The deal would be the largest private equity transaction in South Korea since 2015.
Investment into online grocery services are picking up steam, with Amazon.com Inc buying Whole Foods Market Inc for $13.7 billion last year.
This week alone in Asia, Wal-Mart Stores Inc said it has struck a partnership with Rakuten Inc to launch an online grocery delivery service in Japan. While Alibaba Group Holding Ltd and U.S. grocer Kroger Co have had early discussions on working together, a source familiar with the matter said.
Online grocers in South Korea have an advantage over competitors in other countries as about half of the country's population resides in Seoul and its surrounding areas, Hana Investment & Securities said in a report this month.
E-Mart is likely to grab the lion's share of the market given that firms need substantive logistics infrastructure to maintain freshness, creating a high entry barrier for newcomers, the report said.
E-Mart and department store operator Shinsegae, relatively new to e-commerce, notched up double-digit increases in online sales in recent years.
By 2023, Shinsegae has said it wants to boost annual online sales five-fold to 10 trillion won ($9.4 billion) and become South Korea's No. 1 e-commerce firm.
Seo at Shinyoung Investment said Shinsegae's online business had broken even in the second half of 2017, even as other rivals like SoftBank-backed Coupang are still suffering huge losses because of intense competition and razor-thin margins.
Under the deal, the two firms will spin off and combine their online business units to launch a separate company this year. The private equity firms will invest 1 trillion won by either purchasing new shares or by other methods, Shinsegae said in a statement.
A Shinsegae spokesman said the latest funding could help finance potential acquisitions of other online firms in the longer term.
($1 = 1,060.3000 won) (Reporting by Hyunjoo Jin; Additional reporting by Elaine Tan; Editing by Edwina Gibbs)