The left-back underwent surgery in November 2012 and returned in September 2013 for a run of six games - scoring twice against Millwall - before suffering a further setback in October.
Murphy, who turned 30 on Saturday, has been forced to call time on his playing career and told Birmingham's official website: "All of my rehabilitation went as well as it could have done and I managed to return to playing for a brief spell.
"However, I wasn't able to sustain the heights of my previous form and as a result I have no option but to retire.
"Having sought advice from the surgeon and medical staff at the football club, I had to make sure in my own mind that I was ready to retire.
"I have reached that decision and will look forward to the next chapter in my life."
A club statement added: "Everybody associated with the football club would like to take this opportunity to thank David for his fantastic service to Birmingham City and wish him well for the future."