During an open team practice before the 2002 World Cup, Mellberg broke into a fight with his teammate former Arsenal winger Freddie Ljungberg after a robust tackle from Mellberg. The two of them were quickly separated by teammates. 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. In 2003, he was selected as the best Swedish player of the year, winning the Guldbollen.
During a 2006 FIFA World Cup Qualifying match against Croatia in October 2005, Mellberg boxed the ball away with his hand in the Swedish penalty area. Croatia were awarded a penalty kick for this, which Dario Srna scored, and Sweden lost the match 0-1.
After the 2006 FIFA 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. On 7 October 2006, Mellberg returned to Sweden's lineup for their European Championships qualifier against Spain, which they won 2–0. In the 2012 European Championships, Mellberg was involved in two goals in their match against England in the group stages to give Sweden a 2–1 lead, however, Sweden went on to lose 2–3 while Mellberg became "Man of the Match". After the tournament, Mellberg decided to end his international career.