Ellis, 28, who played 173 times in nine seasons for the Tigers, also made 23 England appearances as well as one for the British and Irish Lions.
He has only played 24 times for Leicester in the last three seasons however, after rupturing anterior cruciate ligaments.
“I have a history of problems with that knee and it got almost impossible to play on,” Ellis told the Leicester Mercury.
“I was battling through the pain barrier all the time. It was even affecting me when I wasn’t playing.
“It was a very hard decision to make, but it was also easy on the basis of what it had been doing to me.
“As well as my rugby, there was also my health to think about. The amount of painkillers I was taking every day was causing my stomach real problems.”
Ellis is popular among players and coaches and received plenty of good wishes following the disappointing news.
England manager Martin Johnson, a team-mate of Ellis with Leicester and England, said: “Harry has been an excellent player who always gave everything for Leicester Tigers and England.
Tigers head coach Richard Cockerill said Ellis had “great strength of character” and would be missed at the club.
“It is always a sad day when injury ends the career of any player, and Harry has been a valuable and popular member of the squad here for almost 10 years.”
MORE: The latest football news
MORE: The latest tennis news