The Bulgarian midfielder, whose leukaemia is in remission after treatment, said he was going to focus on helping people with the disease having set up a foundation.
"It is with a heavy heart that I am announcing my retirement from the game," the 33-year-old, who will remain on medication for another two years, said in a statement on the club's website.
"That I am ready to embrace new challenges will make this process much easier. Since being diagnosed with acute leukaemia in March 2012, I have come to understand and appreciate the way in which this disease impacts the lives of so may.
"I can help and I want to help... I hope to make a difference."
Petrov, who says he initially thought his illness was a routine cold, thanked his family as well as the club's fans and staff for their support over the past year.
He has been to Villa Park on numerous occasions this season, receiving a minute's applause in the 19th minute of games. His old shirt number was 19.
Villa have been embroiled in the relegation battle for much of the season but have now climbed to 13th place in the table on 40 points and while not quite mathematically safe, are highly likely to stay up.
Petrov started his career at CSKA Sofia in his native Bulgaria before a spell at Scottish side Celtic prior to his move to Aston Villa. He earned a Bulgarian record 105 international caps, scoring eight goals for his country.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.