The 35-year-old defender has barely played over the last year because of the problem and has decided to hang up his boots. Ujfalusi joined Sparta Prague on a one-year contract this summer but has not made a league appearance for them and he reached a mutual agreement with the Czech club to terminate his contract following Sunday's win over Jablonec.
A statement on Sparta's official website read: "Tomas Ujfalusi signed with Sparta before the start of the season after being sidelined with a knee injury for more than a year. After six months with Sparta, he decided to retire from professional football as his health does not allow him to continue with his career anymore."
Ujfalusi, who made 78 appearances for the Czech Republic before retiring in 2009 and played for the likes of Atletico Madrid, Fiorentina and Galatasaray at club level, admitted he did not want to undergo another operation on the knee in a bid to try and extend his career.
He said: "I'd like to thank Sparta Prague for giving me a chance, despite the risk. I tried to continue playing at the top level but it is not possible anymore. I made the decision in a couple of days. My knee would require another operation with a long rehab and I am not willing to go through this again."
Ujfalusi featured in two friendlies and two domestic cup matches for Sparta but has not been involved in their league campaign, where the Prague outfit are unbeaten with 13 wins from 16 games and five points clear at the top of the table.
The defender added: "It's a shame I didn't get to play any league matches but, on the other hand, the boys played well and there was no reason to change the line-up. If they'll be this successful in the spring part of the season, I will be more than happy."