The 32-year-old former Ireland international picked up knee and hip injuries in May which required surgery and Fahey has been unable to return to fitness.
“Unfortunately I have had to come to this decision after taking advice from the doctor and surgeon, I feel that it is the right time to finish playing professional football,” said the Dubliner.
“I’d like to thank everyone that has supported me, managed me and played with me during my time playing football.”
Rovers boss Pat Fenlon said: “Keith will be a big loss to Shamrock Rovers and the League of Ireland in general. He has been a central part of our squad this season and has been a great influence on the players, particularly the younger members of our squad.
“We will miss his experience at the club, experience he brought from playing at the top level of English football, in addition to his international career, and I want to wish him all the best in his retirement.”
Fahey earned 16 Irish caps in a career that had spells at Bluebell United, Arsenal, Aston Villa, St Patrick’s Athletic, Birmingham City, and Drogheda United. He made 121 appearances for Birmingham during a four-year spell, winning the 2011 League Cup as they beat Arsenal.