The castle was originally built on a rock in the centre of the river in 1215 by the Fitzgeralds, marking the southern limit of their newly conquered territory.
During the Irish Confederate Wars of the 1640s the castle changed hands on a number of occasions, before being finally destroyed by a Cromwellian army in 1652.
Despite the destruction of the fortress, a Constable of Castlemaine Castle continued to be appointed until 1832, receiving income from the fisheries and fairs of the town and river.
[citation needed] In June 1921, an IRA ambush near Castlemaine during the Irish War of Independence resulted in four security-force members being killed.
The village was attacked in January 1923 during the Irish Civil War by Anti-Treaty fighters under Tom McEllistrim and John Joe Sheehy.