Hammarby IF began as a rowing club. On 10 April 1889 Hammarby Roddförening was founded in Södermalm, in the southern part of central Stockholm, and the football department was created on 13 August 1915. The first ground was Hammarby IP, which the club used until 1946. It still regards Södermalm as its heartland, although the team now plays in Johanneshov, in the south of the city. The colours are green and white, and the team's nickname is Bajen. In 1916 the club entered Svenska Mästerskapet for the first time, the cup competition which at that time decided the Swedish champion.
In the first Allsvenskan season, 1924–25, Hammarby played alongside AIK, with whom it has had a Stockholm rivalry from the start. Over the following decades it went down and up, and it last dropped out of the top flight by finishing bottom in 1939–40. It won the title only in 2001, and it remains its only championship. The team won 14 matches, drew 6 and lost 6, collecting 48 points, with Andreas Hermansson the top scorer on 14 goals and Lars Eriksson in goal. Djurgården finished second and AIK third, so for the first time three Stockholm clubs were on the podium.
The title gave Hammarby a place in the Champions League qualifiers of 2002–03. A year later the club was runner-up, with 51 points and Kennedy Bakircioglü as top scorer (12 goals), which took it into the 2004–05 UEFA Cup. Then followed longer, harder years, including relegation, but in 2014 the club won Superettan and it has played in Allsvenskan again since 2015. In 2015 its average attendance of 25,507 was a record for Swedish top-flight football, overtaking Örgryte's 25,490 from 1959.
The club's recent history has brought further success. In 2020–21 Hammarby won its first Swedish Cup, and it finished runner-up in the league in 2024 (54 points) and improved on that in 2025 (62 points, 60 goals). The top scorer in 2025 was Nahir Besara with 17 goals, and the team played in the 2025–26 Conference League qualifiers, going out in the third round. In 2026 the club is again among the leaders in the table.
The club's stadium in Johanneshov was opened in 2013 and holds about 30,000 spectators for football matches. It is shared by Hammarby and Djurgården, and the matches between them, and the derbies with AIK, are among the best-attended in the country. Average league attendances in recent seasons have been between about 23,500 and 24,300.
The club's ownership structure differs from the Swedish norm. The majority, 51%, belongs to the supporters' and members' association, 23.5% to the American company AEG, and 23.5% to Zlatan Ibrahimović, who has been a co-owner since 2019. A story that began with a rowing club from southern Stockholm shows how far Hammarby has come, while keeping the identity of a club from Södermalm.