Odense Boldklub was founded on 12 July 1887 as Odense Cricketklub, a body with cricket as its only sport. In 1889 football and tennis were added and the name was changed to Odense Boldklub, with the club based in the Munke Mose area of the city. The first sign of football ambition came in 1916, when it won the provincial championship and reached the semi-final of the Danish championship, where it lost 3–9 to B.93 from Copenhagen. After the Second World War the Danish league was reorganised and OB started in the third tier, but the goals of Svend Jørgen Hansen, its first national team player (1942), and Jørgen Leschly Sørensen brought a quick return to the top. Sørensen was sold to Atalanta in 1949, and in 1951 OB won its first medals, silver behind Akademisk Boldklub.
A long decline followed. OB was relegated in 1955 and, despite promotions in 1957 and 1966, it did not stay in the top flight until 1975. The local rival B 1909 won the Danish championship in 1959 and 1964, and the rivalry produced the club's record home attendance of 28,000 at a second-division match in 1973. In 1968 the club moved to Ådalen near the Odense River, where it still trains, and in 1974 it played its first Danish Cup final, losing 2–5 to Vanløse.
The golden age was linked with the coach Richard Møller Nielsen, who took charge in 1975 and later became the national coach of Denmark, leading it to the European title in 1992. With the midfielder Allan Hansen, twice Danish Player of the Year (1977 and 1981), OB won the Danish championship in 1977 and 1982, and in 1983 it added the cup for its only double. The goalkeeper Lars Høgh played a club record of 817 matches between 1977 and 2000. The third title came in 1989 under Roald Poulsen, ahead of the defending champions Brøndby. OB has also won the Danish Cup five times, in 1983, 1991, 1993, 2002 and 2007. The 1991 final against AaB, played in Odense because the national stadium was being rebuilt, was decided by penalties after two goalless matches and extra time. The first title also brought the first European match, in the 1978 European Cup, which ended with a first-round defeat by Lokomotiv Sofia.
The club's greatest European result is known in Denmark as the Miracle in Madrid. In the 1994–95 UEFA Cup, OB beat Flora Tallinn 3–0 and 3–0, Linfield 1–1 and 5–0, and went past Kaiserslautern on away goals after 1–1 and 0–0 draws, reaching beyond the first round of a European competition for the first time. The fourth-round draw brought Real Madrid, the side of Michael Laudrup. OB lost the first leg 2–3 at home and therefore needed to win by two goals in Spain. Ulrik Pedersen gave the Danes the lead, Høgh kept the Spaniards from scoring, and Morten Bisgaard scored the second goal shortly before stoppage time, giving OB a 4–3 win on aggregate. Commentators noted that it was a tale that even Hans Christian Andersen, born in Odense, could not have dreamt up. In the quarter-final Parma won 1–0 away after a penalty conceded by Steen Nedergaard, and the return in Odense ended 0–0.
Since then the club has lived through sharp swings. It was relegated in 1998, returned a year later as winner of the second division and, in the Superliga, finished second in 2008–09 and 2009–10. The sale of forward Per Pedersen to Blackburn Rovers for £2.3 million in 1997 remains the club's record. In 2023–24 OB was relegated for the first time in 26 years, but it won the 1. Division the following season and returned to the Superliga, finishing 2025–26 in eighth place under the German coach Alexander Zorniger. Supporters know the team as De Stribede, The Striped, and the club's home ground is the stadium in Ådalen.