Erik Olof Mellberg was born in Gullspång, Sweden on 3 September 1977 to parents Berit and Erik. Mellberg's mother Berit was a physical education teacher who passed on her love of sport to her son.[2] As a youth, Mellberg enjoyed playing tennis and dreamed of Wimbledon rather than the World Cup. Mellberg was something of a tennis prodigy[3] and it was not until he was 14 that Mellberg began to focus on football.[2]

Mellberg played for local side Gullspång before being picked up by then Swedish Premiership side Degerfors IF. After being relegated he joined capital club AIK, where he made an instant impression, became Swedish champion 1998 and was sold after just 10 months. Spanish side Racing Santander moved to secure the promising Swedish centre half, and although having a difficult time adjusting to Spanish football he soon claimed a starting berth and impressed in his first season. Continuing to play well, Mellberg was said to be on his way to several big Spanish sides, including Barcelona and Valencia.

However, Aston Villa managed to secure his signature and he became a consistent and vital part of the team.[4] Mellberg was left out of boss David O'Leary's first side for a game against Portsmouth, but was soon made the captain of the club for the rest of his reign. Mellberg was a vital part of the team that finished 6th in the Premier League and reached the semi-finals of the League Cup in O'Leary's first season. Mellberg resigned as captain following the 2006 World Cup—he was replaced by Gareth Barry. In 2007 the new manager of Aston Villa, Martin O'Neill, continued to consider Mellberg as the first choice centre back. On the opening day of the 2006–07 Premiership season Mellberg became the first person to score in a competitive game at Arsenal's new Emirates Stadium. During the 2007–08 season, he played at the right back position following the purchase of Zat Knight, who played alongside Martin Laursen at centre back. Mellberg was sent off against Portsmouth on 15 March 2008 for two bookable offences.

In January 2008 it was announced that Mellberg had signed a pre-contract agreement with Juventus. His final home game for Aston Villa was against Wigan Athletic on 3 May. The game was designated as "Olof Mellberg" day in appreciation of his service to the club. On his final game for Aston Villa away at West Ham United, as a leaving gift, Mellberg gave every single Villa fan at Upton Park either a home or an away shirt with his name and number on the back and the message Thanks 4 Your Support – being the number 4 of Aston Villa.[5] He also said he would frame the kit which he used on his last ever Aston Villa game – the game against West Ham.[5] To this day Mellberg is very highly thought of and respected by Aston Villa supporters as one of their greatest ever players.

In January 2008 it was confirmed that Mellberg had signed a pre-contract agreement with Italian giants Juventus, allowing him a Bosman move to Serie A on a three-year contract for the start of the 2008–09 season. He made his Juventus debut on 16 July 2008 in a friendly match versus Serie B outfit, Piacenza. Juventus surprisingly lost the match 1–0. On 18 January 2009, Mellberg scored his first goal for Juventus against Lazio in the 30th minute.

On 23 June 2009, it was confirmed that Mellberg agreed with Olympiacos to sign a three-year contract with the club. Olympiacos paid Juventus €2.5 million for the Swede's signature.[6] Despite the rotation of several managers in the club while there, he was always a constant in the central defence and his consistency and experience proved to be invaluable for Olympiakos. Thanks to his passionate play and high professionalism, he has become a fan favourite – to the point that when Olympiakos had a streak of bad games, Mellberg was always the only player who was spared from criticism – and one of the most highly respected players in Greece.

Mellberg turned down a new deal at the end of the 2011–12 season to extend his time in Athens, hoping to find a new challenge with his agent saying, "...we don't close any doors."[7]

On 8 August 2012, Mellberg signed a one-year contract with Spanish club Villarreal.[8] Mellberg appeared 29 times for Villareal in Spanish Segunda Division, scoring twice, and was an important part of the squad that finished second in Segunda Division and was promoted to Spain major league La Liga.

During an open team practice before the 2002 World Cup, Mellberg broke into a fight with his teammate former Arsenal winger Fredrik Ljungberg after a robust tackle from Mellberg.[10] The two of them were quickly separated by team-mates. Since then, the two of them have been known for not being the best of friends, and in the 2006 World Cup, Mellberg and Ljungberg, according to leak from inside the team, had a very fiery argument, after Sweden's draw with Trinidad and Tobago.[11] In 2003, he was selected as the best Swedish player of the year, winning the Guldbollen.[12]

After the World Cup in Germany, Mellberg relinquished his captaincy and Ljungberg took his place as Sweden captain.

On 4 September 2006, Mellberg, along with Sweden teammates Zlatan Ibrahimović and Christian Wilhelmsson, was sent home from the national squad for breaking an 11 pm team curfew ahead of a European Championships qualifier against Liechtenstein.[13] On 7 October 2006, Mellberg returned to Sweden's lineup for their European Championships qualifier against Spain, which they won 2–0.[14] In the 2012 European Championships, Mellberg scored twice in their match against England in the group stages to give Sweden a 2–1 lead, however, Sweden went on to lose 2–3.[15] After the tournament, Mellberg decided to end his international career.[16][17]