Centre-back Mellberg, 36, ended his career at Copenhagen after playing in the top flights in England, Italy and Spain.
The 117-time Sweden international's stint at Aston Villa stretched from 2001-08 and saw him feature 232 times in the Premier League for eight goals.
The defender also featured in two World Cups with Sweden in 2002 and 2006, and remains third in the list of most caps for his country.
Mellberg confirmed he had called time on his well-travelled career.
"Today I ended my contract with FC Copenhagen, which will be the last in my football career," Mellberg said via a statement.
"Thanks to all the fans, players, coaches and others who I have had the pleasure of working with over the years."
Mellberg started his career on home soil with Degerfors IF, before moving to Swedish powerhouse AIK in 1997.
A switch to La Liga followed, as he made 98 league appearances for Racing Santander, before a transfer to Aston Villa saw him enjoy a prolonged period in England.
Mellberg found himself at Juventus for the 2008-09 campaign, before getting comfortable at Olympiacos the next season and staying for another two terms.
The powerful defencer moved back to Spain for a season with Villarreal, before his curtain call in Denmark.
Thank you for reading 5 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1