The Northern Irishman, 26, revealed on Monday he had ruptured an ankle ligament playing football with friends.
Confirming he would not compete at St Andrews, he posted on Instagram: “I’m taking a long-term view of this injury.
“Although rehab is progressing well, I want to come back to tournament play when I feel 100% healthy and 100% competitive.”
The 2015 Open begins on 16 July, and tournament organisers said they were “naturally very disappointed” at McIlroy’s withdrawal.
They added: “Rory will play in many more Opens and our primary concern is for his complete recovery.”
McIlroy, who has won four majors, could also miss the chance to defend his US PGA Championship title in mid-August.
He has had a mixed season so far, finishing fourth at the Masters in April, and joint ninth at last month’s US Open. Both tournaments were won by Jordan Spieth.
McIlroy missed the cut at the Honda Classic in March, but won the World Golf Championships Match Play and the Wells Fargo Championship in May.