McTavish was one of nine United players whose contract option was declined by the club back in November. Two of those players, Clyde Simms and Marc Burch, were snapped up by other teams in December's MLS re-entry draft, with Burch joining the Seattle Sounders and Simms leaving for the New England Revolution.
McTavish, who missed the entire 2011 season with a concussion, is the second player in that group of nine to retire, after Santino Quaranta announced he was stepping away from the game earlier this month.
A native of Winchester, Virginia, McTavish made 83 league appearances and 69 league starts for United. In his most productive year, 2008, McTavish made 25 starts and played 2,223 minutes.
"I have to take care of my body, and after talking to a doctor I have taken his advice," McTavish said in a statement released by the club. "I thought long and hard about it and just decided that it's time to quit playing the game - mostly for health reasons."