Athlone is on the border of counties Roscommon (province of Connacht) and Westmeath (province of Leinster). Although the River Shannon forms the historic border between Roscommon and Westmeath, the Local Government Act of 1898 designated all of Athlone (Urban) as belonging to Westmeath, including areas west of the river. Much recent growth has occurred outside the official town boundaries.
Athlone is near the geographical centre of Ireland which is 8.85 kilometres north-northwest of the town, in the townland of Carnagh East in County Roscommon.
At the heart of Athlone, both geographically and historically, is the Athlone Castle. The ford of Athlone was strategically important, as south of Athlone the Shannon is impassable until Clonmacnoise (where the Esker Riada meets the Shannon), and north is Lough Ree. In 1001 Brian Bóru led his army from Kincora into the town, his fleet sailing up the river, via Lough Derg, to attend a gathering.
A bridge was built across the river in the 12th century, approximately 100 metres south of the current bridge. To protect this, a fort was constructed on the river's west bank in the town by Turloch Mór Ó Conor. On a number of occasions both the fort and bridge were subject to attacks, and towards the end of the 12th century the Anglo-Normans constructed a motte-and-bailey fortification there. This was superseded by a stone structure built in 1210 by Justiciar John de Gray. The 12-sided donjon dates from this time. The rest of the castle was largely destroyed during the Siege of Athlone and subsequently rebuilt and enlarged.
During the wars that racked Ireland in the seventeenth century, Athlone held a vital position, holding the main bridge over the River Shannon into Connacht. In the Irish Confederate Wars (1641–1653), the town was held by Irish Confederate troops until it was taken late in 1650 by Charles Coote, who attacked the town from the west, having crossed into Connacht at Sligo.
Forty years later, during the pan-European War of the Grand Alliance, the town was again of key strategic importance, being one of the Jacobite strongholds defending the river-crossings into the confederate-held Province of Connacht following their being routed at the battle of the Boyne on 1 July, 1690. In that year, the Jacobite forces of Colonel Richard Grace repelled an attack by 10,000 men led by Commander Douglas. In the following year's campaign, the Siege of Athlone saw a further assault by a larger allied force in which the invading troops of King William and Queen Mary eventually overran the entire city, forcing the defenders to flee further west toward the River Suck at such speed that eyewitnesses account they "flung their cannons into the morass" as they fled. The most recent account of the Siege of Athlone was discovered in 2004 in an archive in the Netherlands and written on 5 July 1691 after the attack had ended. The contemporary source was penned by the victorious commanding officer from the Republic of the Seven United Netherlands, general lieutenant Godard van Reede, in letters written to his family members in mainland Europe. In the account, the commanding allied officer reported that half of the city's defenders retreated westward towards the rest of their army, leaving almost 2,000 dead within the city walls and more than 100 taken prisoner, among whom were dozens of officers.