The area around the mouth of the Whanganui river was a major site of pre-European Māori settlement. The pā named Pūtiki (a contraction of Pūtikiwharanui) was and is home to the Ngāti Tūpoho hapū of the iwi Te Āti Haunui-a-Pāpārangi.
It took its name from the legendary explorer Tamatea-pōkai-whenua, who sent a servant ashore to find flax for tying up his topknot (pūtiki).
In the 1820s coastal tribes in the area assaulted the Kapiti Island stronghold of Ngāti Toa chief Te Rauparaha. Te Rauparaha retaliated in 1830 sacking Pūtiki and slaughtering the inhabitants.
The first European traders arrived in 1831, followed in 1840 by missionaries Octavius Hadfield and Henry Williams who collected signatures for the Treaty of Waitangi.
On 20 June 1840, the Revd John Mason, Mrs Mason, Mr Richard Matthews (a lay catechist) and his wife Johanna arrived to establish a mission station of the Church Missionary Society. Revd Richard Taylor joined the CMS mission station in 1843. The Revd Mason drowned on 5 January 1843 while crossing the Turakina River.
By 1844 the brick church built by Mason was inadequate to meet the needs of the congregation and it had been damaged in an earthquake. A new church was built under the supervision of Taylor, with the timber supplied by each pā on the river in proportion to its size and number of Christians.
After the New Zealand Company had settled Wellington it looked for other suitable places for settlers. Edward Wakefield, son of Edward Gibbon Wakefield, negotiated the sale of 40,000 acres in 1840, and a town named Petre – after Lord Petre, one of the directors of the New Zealand Company – was established four kilometres from the river mouth.
The settlement was threatened in 1846 by Te Mamaku, a chief from up the Whanganui River. The British military arrived on 13 December 1846 to defend the township. Two stockades, the Rutland and York, were built to defend the settlers. Two minor battles were fought on 19 May and 19 July 1847 and after a stalemate the up river iwi returned home.
By 1850 Te Mamaku was receiving Christian instruction from Revd Taylor.There were further incidents in 1847 when four members of the Gilfillan family were murdered and their house plundered.
The name of the city was officially changed to Wanganui on 20 January 1854. The early years of the new city were problematic. Purchase of land from the local tribes had been haphazard and irregular, and as such many Māori were angered with the influx of Pākehā onto land that they still claimed. It was not until the town had been established for eight years that agreements were finally reached between the colonials and local tribes, and some resentment continued (and still filters through to the present day).
Wanganui grew rapidly after this time, with land being cleared for pasture. The town was a major military centre during the New Zealand Wars of the 1860s, although local Māori at Pūtiki led by Te Keepa Te Rangihiwinui remained friendly to settlers. In 1871 a town bridge was built, followed six years later by a railway bridge at Aramoho.
Wanganui was linked by rail to both New Plymouth and Wellington by 1886. The town was incorporated as a Borough on 1 February 1872, and declared a city on 1 July 1924.
Perhaps Wanganui's biggest scandal happened in 1920, when Mayor Charles Mackay shot and wounded a young poet, Walter D'Arcy Cresswell, who had been blackmailing him over his homosexuality. Mackay served seven years in prison and his name was erased from the town's civic monuments, while Cresswell (himself homosexual) was praised as a "wholesome-minded young man".
Mackay's name was restored to the foundation stone of the Sarjeant Gallery in 1985.
The Whanganui River catchment is seen as a sacred area to Māori, and the Whanganui region is still seen as a focal point for any resentment over land ownership. In 1995, Moutoa Gardens in Wanganui, known to local Māori as Pakaitore, were occupied for 79 days in a mainly peaceful protest by the Whanganui iwi over land claims.
Wanganui was the site of the New Zealand Police Law Enforcement System (LES) from 1976 to 1995. An early Sperry mainframe computer-based intelligence and data management system, it was known colloquially as the "Wanganui Computer".
The data centre housing it was subject to New Zealand's highest profile suicide bombing in 1982 when anarchist Neil Roberts detonated a gelignite bomb in the entry foyer. Roberts was the only casualty of the bombing.