LONDON, 6 Jul 2015 (AFP) - "Total rupture of left ATFL (ankle ligament) and associated joint capsule damage in a soccer kickabout with friends on Saturday," the Northern Irishman said.
"Continuing to assess extent of injury and treatment plan day by day. Rehab already started..... Working hard to get back as soon as I can."
He also posted a photograph on Instagram showing himself on crutches and wearing a protective boot.
A spokesman for McIlroy later said that, despite the injury, he has not ruled himself out of defending his Open Championship title at St Andrews from July 16.
The 26-year-old McIlroy had also been due to play in the Scottish Open at Gullane starting on Thursday to prepare for St Andrews, but the injury looks like ruling him out of that.
McIlroy won his first British Open crown at Hoylake last July and then went on to win the PGA Championship, taking his haul of major titles to four.
He was on target for a clean sweep of all four major titles at the Masters in April but could only place fourth behind Jordan Spieth.
The 21-year-old American then won again at the US Open last month and his budding rivalry with McIlroy was set to become the focal point of the Open.
Former Ryder Cup captain Sam Torrance was taken by surprise by the news as he arrived at Wimbledon to watch the day's action there.
"That's the first I've heard of it but I'm in complete shock: that's a big blow to (the Open) if he misses it," Torrance said.
"That's obviously bad news and I'd just wish him all the best and hope he can make a quick recovery."
McIlroy gave no details about how long he expected to be sidelined, but injuries such as the one he has outlined can take weeks or, in the worst cases, months to fully recover from and even require surgery.
Should he be sidelined for more than a month, he would also be unlikely to be able to defend his PGA Championship which gets under way at Whistling Straits, Wisconsin, on August 13.