The 35-year-old had been left out of Australia's final warm-up match against Essex after suffering a recurrence of the knee trouble that has plagued his career.
Scans revealed that his right knee had suffered more damage.
"Given the news I received yesterday (Friday), and after talking it over with my family, I know now is the right is the time to step away from cricket," Harris said in a Cricket Australia (CA) statement.
CA added that 22-year-old Pat Cummins has been called up to replace Harris ahead of the first Ashes Test which gets underway in Cardiff on Wednesday.
His best figures were 7-117 against England at Chester-le-Street in 2013. He also played 21 one-day internationals, claiming 44 wickets at an average of 18.90.
"I'm pretty lucky, I have had a wonderful career and nothing made me prouder than pulling on the Baggy Green," added Harris.
"I played 27 more Tests than I ever thought I would and I have relished every single moment of them."
"This is a very special team and I know they will do Australia proud in this Ashes Series. I know I will certainly be watching every ball.
