The 33-year-old made 93 appearances for RaboDirect PRO12 side Munster winning two Heineken Cups after moving from Connacht in 2003.
Flannery won 41 caps for Ireland, starting four of their five games in the 2009 Six Nations Grand Slam triumph only to be ruled out of the British and Irish Lions tour later that year with a fractured elbow.
He has struggled with injury for the past two seasons, last playing competitively in Ireland's World Cup defeat of the US Eagles at New Plymouth's Yarrow Stadium in September.
Flannery subsequently sustained a calf injury in training and was replaced in Ireland's squad by Damien Varley before developing the back problem, and now despite extensive treatment has been forced to call it a day.
"I'm very sad to have to announce my immediate retirement from rugby due to injury," said Flannery.
"Since my injury in the World Cup, I've struggled to regain the fitness required to play at this level.
"I would like to thank all the medical staff who have worked so hard on my behalf and shown great patience in dealing with me. I feel incredibly privileged to have played with so many great players.
"To train hard and win trophies for Munster and Ireland alongside some of my best friends has been an amazing experience.
"I'm incredibly grateful for all the opportunities rugby has given me to date and I would like to thank all my friends, family, coaches and team-mates for their support along the way.
"I would also like to thank all the Munster and Irish rugby fans who I have been so proud to represent over the course of my career."
Guinness PRO12
Suite 208, Alexandra House,
The Sweepstakes
Ballsbridge, Dublin 4, Ireland