Best Buy CEO Hubert Joly has led a turnaround at the company that's sent shares soaring. And that's turned into a very big payday for his ex-wife.

On Tuesday Joly disclosed in a filing that he sold 451,153 shares of the company for a total of $16.7 million. He paid $6.3 million to exercise stock options, so he netted just over $10 million through the sale. The company issued a statement saying the sale was prompted by his need to pay a divorce settlement.

"This sale reflects only one thing -- Mr. Joly has recently gone through a divorce and needs to sell a portion of his holdings in order to cover the costs of that unfortunate event," said the company's statement. "He remains heavily invested in Best Buy."

Related: Best Buy - not your standard corporate comeback

The company says Joly's sale represented about 20% of his Best Buy (BBY) stake. Tuesday's filing shows he holds about 476,000 shares after the sale, but a spokesman said Joly has received additional stock grants and options that have not yet been disclosed in company filings.

Joly was born in France and previously worked at Carlson Wagonlit Travel, home of such brands as Radisson and TGI Friday, before he was named CEO of Best Buy on Aug. 20, 2012.

Related: Rebuild your nest egg after a divorce

The company has struggled with weak sales and growing competition from online retailers such as Amazon (AMZN). Shares continued to decline in his first few months on the job, especially as founder and former CEO Richard Schulze failed at his effort to take the company private.

But shares have tripled in value so far this year as Joly cut costs and improved earnings, making Best Buy one of the top performers on the S&P 500 index.