The 33-year-old former Sale and Newcastle forward is hanging up his boots after 119 appearances for Edinburgh over two spells in the capital.
“Obviously there is never a right time to retire or give up the game you love doing, but unfortunately your body tells you when it’s time to stop and for me that’s now,” said McKenzie.
“I suffered a shoulder injury against Scarlets last year and I rehabbed it fully throughout the lockdown period. But then coming back to face Glasgow Warriors in August 2020 I dislocated it again, which meant I had to go for further surgery.
“It’s been an accumulation of injuries and my body has definitely been struggling with the rigours of professional rugby.
“At the end of the day, I’m still a young man and I’ve had a good innings throughout my career. Injury means that I’m stepping away but I’m proud of what I’ve achieved.”
McKenzie captained Edinburgh during the 2017-18 season, leading them to the Guinness Pro14 play-offs.
“Looking back, I’m most proud of getting a professional contract with the club that I grew up supporting and watching – that’s been huge for me,” he said.
“I’ve also been able to travel the world and see plenty of places, while I’ve also been able to experience playing for different teams and different clubs.”
Head coach Richard Cockerill praised McKenzie as a “great example” to young players.
“Fraz is a club legend, make no bones about it,” Cockerill said. “He’s been a hugely important player during both his spells at Edinburgh Rugby and we’re obviously sad to see him retire, but it’s the right decision for Fraz.
“He commands a huge amount of respect from the changing room and that’s testament to the way he carries himself around the club.”
The former Scotland under-20 captain started his career at Dunfermline, his local club. He was included in the 36-man Scotland squad for the 2012 Six Nations but was forced to withdraw with a shoulder injury.