He will be assessed by an orthopaedic specialist on Thursday and will start his rehabilitation as soon as possible.
The British & Irish Lions management will make an announcement regarding a replacement in due course.
The 30-year-old Grand Slam winner is the third Munster player originally selected in Ian McGeechan's squad to miss out on the tour to South Africa.
Scrum half Tomas O'Leary (fractured ankle) and flanker Alan Quinlan (suspension) are the other two to have been sidelined, while Welsh duo Tom Shanklin (shoulder) and Leigh Halfpenny (thigh) are also on the Lions casualty list.
Possible replacements for Flannery include Rory Best, who is currently in Canada captaining the Ireland summer tour squad, and Scottish hooker Ross Ford. Both players are on the standby list for the position.