Cesena was originally an Umbrian or Etruscan town, later known as Caesena. After a brief spell under Gaulish rule, it was taken over by Romans in the 3rd century BC. It was a garrison town of strategic importance which was destroyed in the wars between Gaius Marius and Sulla. Pliny mentions the wines of Cesena as among the best.
Cesena was on the border that the Exarchate of Ravenna shared with the Lombards. It was presented to the Papacy by its Frankish conqueror in 754 (Donation of Pepin) and passed back and forth between the popes and the archbishops of Ravenna; it was also briefly a communal republic (1183–1198). It was then long contested between popes and Holy Roman Emperors. The brief rule by the Forlivese Ordelaffi was crushed in 1357 by Papal troops led by Cardinal Gil de Albornoz, after a long siege heroically endured by Cia degli Ordelaffi, wife of the Lord of Forlì.
The little comune revolted again in 1377 during the War of the Eight Saints. This time it was recaptured by Breton troops of Giovanni Acuto (the English-born condottiere John Hawkwood) under the command of Robert, Cardinal of Geneva, (later antipope Clement VII). The latter, acting as the legate of Pope Gregory XI, directed the savage murder of between 2,500 and 5,000 civilians. By the laws of war at the time this was regarded as an atrocity that earned the label of the "Cesena Bloodbath" and the cardinal the "butcher of Cesena". The following year what remained of Cesena was assigned by the new pope Urban VI to Galeotto I Malatesta.
During the period 1379–1465, the city recovered and prospered under the Malatesta, who rebuilt the castle (called Rocca Malatestiana) overlooking the town. The Malatestiana Library, built by near the castle by Malatesta Novello (1429), is considered a fine example of a Renaissance library and holds many valuable manuscripts.
After Novello's death (1465), Cesena returned to the Papal States, but was again seized by a local seignor, Cesare Borgia, in 1500. The city was elevated to capital of his powerful though short-lived duchy.
Cesena subsequently turned into a secondary city of the Papal States. In the 18th and 19th centuries Pope Pius VI and Pope Pius VII were born in the city, which also had Pope Pius VIII as bishop, gaining the title of "city of the three popes". During the Napoleonic Wars it was stripped of numerous monasteries and churches. Some of its citizens had notable roles in the unification of Italy, in the second half of the 19th century.
During World War II Cesena was near the Gothic Line, which ran along the Appennini near the city, and suffered heavily from bombing.
In 1992, it was elevated to the rank of co-capital of province, together with Forlì.
On July 30, 2015, 1000 people gathered at the Parco Ippodromo park in Cesena, and performed "Learn to Fly" by the Foo Fighters to convince the band to perform there. The group, later known as the Rockin' 1000, was organized by Foo Fighters fans who played the guitar, bass, and drums in unison to a conductor. Dave Grohl responded with a video where he announced in Italian that the band would visit Cesena and perform there. The show was scheduled for November 3, 2015 at the town's indoor sports arena and concert venue, Carisport, becoming the kickoff date for their European tour.