Nilsson started his career with
Ovesholms IF, where he stayed until 1998 when he moved to
Åhus Horna BK. He played for the club for only one season before moving to
Halmstads BK in 2000. His first season was mostly spent on the bench, but eventually he became one of the team's more important players until, during the 2004 season, he was sold to English club
Southampton. At Southampton, he was not able to establish himself as a regular member of the first team and in 2005 he was sold to Greek club
Panathinaikos. On 4 March 2008, he stated that when returning to Sweden he would play for
Halmstads BK, but he would live in
Malmö since he wanted to live in a larger city. On 8 April 2009, Nilsson announced a transfer to
Brøndby IF. He signed a three-year contract and will move to the club on 1 July 2009. Nilsson's Brøndby contract expired on 30 June 2012 after which Nilsson left the club following three years playing as both a right back, midfielder and occasionally right midfielder. In his last six months at Brøndby, Nilsson did not play much as Brøndby did not see Nilsson as part of the club's future. In August 2012 he agreed to play for the Copenhagen-based club
Fremad Amager due to the new assigned coach Per F. Hansen, as he was the former assistant coach of
Brøndby IF. Although on 8 August 2012, Nilsson officially announced his retirement as a player. ==International career==