Djurgårdens IF was founded, primarily by John G. Jansson, on 12 March 1891 at a café in Alberget 4A in the island Djurgården. Most of the founding members were young working class men. The club originally focused on winter sports and athletics. The first real football field in Stockholm was created in 1896. Djurgårdens IF's football department was formed in 1899, with the help of former GAIS player Teodor Andersson. Djurgården played their first match in July 1899, a 1–2 loss against AIK.
The first real achievement was made in 1902 when the team finished second in the tournament Rosenska Pokalen. Just two years later, in 1904, the first Swedish Championship final of the club was played, ending in a defeat against Örgryte IS. The team finished second in three more finals before the first Championship victory came in 1912 after two draws in the final matches against Örgryte, and a replay which Djurgården won. The club won three more Swedish Championships in the early years, in 1915 against Örgryte, 1917 against AIK and 1920 against IK Sleipner. However, DIF never managed to win Svenska Serien, the top Swedish league of the period, before the club's first great era ended. Between 1911 and 1935, Tranebergs Idrottsplats was the homeground for Djurgården. For the 1912 Summer Olympics, Stockholms Stadion was built. It became Djurgården's permanent home arena in 1936.
The club did not qualify for the first season of Allsvenskan, and only reached that league twice between 1924 and 1944, being directly relegated back down to Division 2 both times. The club did also play three seasons in the then third highest league, Division 3, between 1929 and 1932. From 1944 on, the club became a stable Allsvenskan club. In 1951, the team became runners-up in Svenska Cupen after Malmö FF; this was the team's first Cup final.
The second great era took place in the 1950s and 1960s, winning Allsvenskan four times during the period. Djurgården's fifth Swedish championships, and first Allsvenskan championship, was taken in the 1954–55 season under the lead of Frank Soo. In the 1955–56 season, Djurgården became the first Swedish team to enter the European Cup. Beating Gwardia Warszawa in the first round, Djurgården advanced to quarter finals against Scottish Hibernian that they lost by 1–4 over two matches.
In 1959, both the football team and Djurgårdens IF's hockey team won their respective Swedish Championships of Sweden's two most popular sports, a remarkable happening. The 1959 title was secured on Råsunda Stadium, in front of 48,894 people, marking a record attendance for Djurgården, with a team of Sven Tumba, Birger Eklund, Lars Broström, , , Gösta Sandberg, Olle Hellström, Stig Gustafsson, Arne Arvidsson, Hans Mild and Sigge Parling.
The year after, in the 1960 season Djurgården finished 11th and was relegated to . The team only needed one year to return to Allsvenskan. In 1964 and 1966, Djurgården took its seventh and eight championships, with 1966 marking the end of the career of Gösta Sandberg. Sandberg played 322 league matches for the team 1951–66 and scored 77 goals. Gösta Sandberg is known as "Mr Djurgården" and was in 1991 named "Djurgårdare of the century". Sandberg also played for the club's Bandy and Ice Hockey section. He died on his way home after attending the Tvillingderbyt in 2006.
It's during this era that the nickname "Järnkaminerna" ("The Iron Furnaces") was established, due to the clubs physical playing style. The ideal of a strong and uncomprimising Djurgården player might also be traced back to the clubs working class roots.
The 1970s saw no greater successes, however Djurgården was steady in Allsvenskan and had three third-places and a final loss in the 1975 Svenska Cupen Final as the best results. became the first foreign player in the team in the 1977 season.
A chart showing the progress of Djurgårdens IF through the
. The different shades of gray represent league divisions.
The 1980s was not a good decade for the club, being relegated from Allsvenskan in 1981, and losing two promotion play-offs, before making a one-year visit in the highest league in 1986, although DIF returned two years later, and stayed in Allsvenskan for five consecutive seasons, but had no greater success except losing the Championship final in 1988. In 1987, Djurgårdens IF Fotboll presented a 12 million SEK deficit and later transformed into an aktiebolag. Former England striker Teddy Sheringham had a brief spell at Djurgården early in his career, as a 19-year-old loanee in 1985.
The 1990s saw Djurgården being relegated from Allsvenskan no less than three times, and being promoted back two times. During this decade, the club suffered from great economical problems and was close to bankruptcy. The 1995 season started well, but ended bad; in the last home match of the 1995 Allsvenskan, a supporter, later named Terror-Tommy in media, came on pitch and kicked referee Anders Frisk.
In the middle of 1999 season, Zoran Lukic and Sören Åkeby took over the team and won the inaugural 2000 Superettan and finished 2nd as newly promoted in the 2001 Allsvenskan. With a team consisting of Stefan Rehn, Kim Källström, Andreas Johansson, and Andreas Isaksson, Djurgården secured its first title in 36 years in the last round of the 2002 Allsvenskan. The first half of the 2000s was a golden era for the club, with three championships (2002, 2003 and 2005) and three cup wins (2002, 2004 and 2005). This marked the end of the golden era for Djurgården, which ended on sixth place in 2006. The club was one of the main contenders for the league championship in 2007, which ultimately lead to a third place.
The results went downhill in 2008 and 2009; Djurgården ended up in 14th place in 2009, and had to play through a relegation playoff against Assyriska Föreningen to remain in Allsvenskan.
In the early 2010s, Djurgården was a mid-table Allsvenskan team finishing 7th to 11th between 2010 and 2014. When the newly appointed Director of sport Bo Andersson who led Djurgården to three titles in the early 21st century came back in 2014 he was forced to sell players such as Daniel Amartey (who became the most expensive defender ever sold by an Allsvenskan club for about 25 million SEK), Erton Fejzullahu, Christian Rubio Sivodedov and Simon Tibbling which stabilized the financials.
In January 2017, Djurgården sold the Kenyan international forward Michael Olunga for a club record fee of 40 million SEK which made the club's financial positions one of the best in the country. The transfer also made it possible to sign club legend Kim Källström and fellow former Swedish international . Both players, together with recently returned goalkeeper Andreas Isaksson, played important roles as Djurgården finished in third place in the 2017 allsvenskan, qualifying for the second qualifying round for the 2018–19 UEFA Europa League for the first time in ten years. After 13 years without a title Djurgården won the Svenska Cupen (Swedish Cup) on 10 May 2018 going through the Cup scoring 14 goals and not conceding a single goal.