The proceeds will be used to pay down debt and help revitalise its UK business.
Homeplus is being bought by MBK Partners, a South Korean buyout firm set up a decade ago.
It has partnered with a Canadian pension fund and Singapore's Temasek Holdings for the deal.
Dave Lewis, chief executive  of Tesco, said: "This sale realises material value for shareholders and allows us to make significant progress on our strategic priority of protecting and strengthening our balance sheet."
After tax and other costs the sale will produce £3.35bn in cash for Tesco and is expected to be completed before the end of the year.
Retail analyst Nick Bubb said the main aim was to reduce its debt mountain and avoid a rights issue. "Interestingly, however, Tesco say that the disposal will also give it the financial flexibility to buy some UK store freeholds," he added.
Bruno Monteyne, an analyst at Bernstein and a former senior Tesco supply chain executive, said the deal would allow the company to qualify for a top credit rating once more from the ratings firm Moody's in 2017-18.
The Homeplus deal is the first major disposal since Tesco reported a record pre-tax loss of £6.4bn for the year to February.
That compared with annual pre-tax profit of £2.26bn a year earlier.
It was the biggest loss reported by a UK retailer and one of the largest in the country's corporate history.
It's not quite money down the back of the sofa, but the chief executive of Tesco has been hunting for bits of the business he can sell ever since arriving at the beleaguered supermarket last year.
He needed to get rid of assets to fend off speculation that the supermarket's debt - which was standing at over £20bn - was becoming a problem. The South Korean sale goes some way to alleviating the business's balance sheet strain.
Speculation was growing that without significant sell-offs Tesco might need to raise fresh capital from shareholders - never a happy prospect.
Tesco's debt now stands at £17bn, including pension liabilities, so Mr Lewis still has some way to go.
Read Kamal's blog in full
Tesco - the UK's biggest supermarket chain and the world's third largest retailer after Walmart and Carrefour - has faced challenges on several fronts in recent years.
Hard discounters such as Aldi and Lidl have been eroding the market share of the big four supermarket chains, while Tesco has struggled with excess floor space in out-of-town superstores.
Shoppers have moved away from doing one big weekly shop at such stores in favour of topping up more frequently from high street convenience stores.
Writing down the value of Tesco's property portfolio accounted for about £4.7bn of its record annual loss.
In July 2014 Tesco appointed Mr Lewis as chief executive to replace Philip Clarke and he started in October.
Before he took over, the retailer said in September that it had mis-stated profits by £250m - a figure that was raised to £263m a month later.
After an initial rise, shares in Tesco were down 0.4% in afternoon trading at 185.25p, valuing the company at just over £15bn. The stock has fallen almost 18% in the past 12 months.
Homeplus has 140 hypermarkets, 375 supermarkets and 327 convenience stores.
The BBC's Seoul correspondent Stephen Evans says it has been very successful and shaken up shopping in South Korea, providing local goods as well as some Tesco staples such as its own range of wine and tea.
The MBK Partners consortium said it planned to invest 1 trillion won (£546m) in Homeplus over the next two years to increase its competitiveness.
Tesco has sold Homeplus, its South Korean business, for £4.2bn as the troubled supermarket chain seeks to shore up its balance sheet.