European history of the region dates back to 1627 when the Dutch vessel Gulden Zeepaert, skippered by François Thijssen, passed through waters off the Esperance coast and continuing across the Great Australian Bight.
French explorers are credited with making the first landfall near the present day town, naming it and other local landmarks whilst sheltering from a storm in this area in 1792. The town itself was named after a French ship, the Espérance, commanded by Jean-Michel Huon de Kermadec. Espérance, is French for 'hope'.
In 1802, British navigator Matthew Flinders sailed the Bay of Isles, discovering and naming places such as Lucky Bay and Thistle Cove. Whalers, sealers and pirates followed, as did pastoralists and miners, keen to exploit the free land and cash in on the gold boom in the gold fields to the north.
The area of the Esperance townsite was first settled by the Dempsters, a pioneer family of Scottish descent, in the 1870s. A telegraph station was opened in 1876, although the formal gazettal of the townsite did not occur until 1893.
The town jetty was also built through the 1890s, following the discovery of gold in the eastern goldfields region.
The population of the town was 985 (623 males and 362 females) in 1898.
A railway line between Coolgardie and Esperance was completed in 1927.
The mallee area approximately 100 km (62 mi) north of the town began grain production in the 1920s, and by 1935 the construction of a second jetty, tankers jetty, was completed.
Agriculture was introduced to the Esperance sand plain by an American syndicate, in partnership with the state government, in the 1960s following the discovery that adding superphosphate fertilisers containing trace elements to the poor soils made them suitable for cropping and pastoral activity. Despite early difficulties, the project eventually became a success and large areas of land were cleared during this time.
The population of the town in 1968 was approximately 2,700.
In 1979, pieces of the space station Skylab crashed onto Esperance after the craft broke up over the Indian Ocean. The municipality fined the United States $400 for littering. The fine was paid in April 2009, when radio show host Scott Barley of Highway Radio raised the funds from his morning show listeners, and paid the fine on behalf of NASA. Skylab's demise was an international media event, with merchandising, wagering on time and place of re-entry, and nightly news reports. The San Francisco Examiner offered a $10,000 prize for the first piece of Skylab to be delivered to their offices. Seventeen-year-old Stan Thornton scooped a few pieces of Skylab off the roof of his home in Esperance, caught the first flight to San Francisco, and collected the prize.
In January 2007 Esperance experienced a storm with wind gusts of up to 110 km/h (68 mph) which brought 155 mm (6 in) of rainfall within 24 hours, causing significant flooding. More than 100 homes were damaged, several boats were destroyed, trees were felled, 35 m (115 ft) of bridge on the South Coast Highway, (the main road linking Esperance to Perth), was washed away, and power was cut from thousands of homes. The Western Australian Government declared the area a "natural disaster zone". At least 37,000 sheep were killed in the storm.
There are five primary schools in the region: Our Lady Star of the Sea Catholic Primary School, Castletown Primary School, Esperance Primary School, Nulsen Primary School and Esperance Christian Primary School. There are also two secondary schools: Esperance Senior High School and Esperance Anglican Community School.
The Anglican school won an appeal in December 2009 against a State Government condition which limited it to grades 8–10; the school can now educate years 8–12.
South Regional TAFE also has a campus in the town.
Esperance is at the southern end of the Coolgardie–Esperance Highway and the eastern end of the South Coast Highway, both highways forming a part of Australia's Highway 1.
The city is connected by public transport to Perth, Albany and Kalgoorlie via Transwa coach services GE1, GE2, GE3 and GE4.
Virgin Australia Regional Airlines (formerly Skywest Airlines) has daily flights to/from Perth, arriving and departing from Esperance Airport. The airport is also used for general aviation.
The Esperance Branch Railway is a standard gauge railway line from Kalgoorlie to Esperance, linking the region to the Trans-Australian Railway and the Eastern Goldfields Railway. This is a freight-only railway and no passenger services currently run.
Near the town itself are numerous beaches, offering surfing, scuba diving, and swimming. Also nearby are a number of salt lakes, including Pink Lake, which gains its rosy hue from red algae living within its waters. Esperance is also home to the Cyclops wave, said to be the world's heaviest wave with massive amounts of water unloading on shallow reef. Cyclops is featured in the surfing films Billabong Odyssey, and the Bra Boys documentary.
There are five major national parks near the town. A major nearby tourist attraction, 20 minutes away from the town centre, is the Cape Le Grand National Park, which offers a picturesque coast of largely granite terrain and sheltered white sand beaches. The park is a popular spot for recreational fishing, as well as four wheel drive enthusiasts and hikers.
Esperance also has a number of wind turbines supplying electricity to the town. Esperance had the first electrical wind farm in Australia, built at Salmon Beach as a research facility in 1987.
In late 2007, a television advertisement promoting one of the newer Ferrari cars was filmed on Esperance's foreshore, to be shown overseas.
Esperance experiences a Mediterranean climate (Köppen climate classification Csb) with warm, dry summers and cool, wet winters. It is subject to wide variations in the weather, from hot summer days when northerly winds arrive from the interior of the state, to cold, wet winter days with southerly winds from the Great Southern Ocean. Annually, the city has 85.5 clear days.
Esperance has the only port in the south-east of Western Australia – the Esperance Port Authority completed a A$54 million upgrade in 2002. The upgrade made the port one of the deepest in southern Australia, capable of handling Cape-class vessels (up to 180,000 tonnes) and fully loaded Panamax-class vessels (up to 75,000 tonnes).
Exports for the year ending June 2005 were 7,694,155 tonnes, including 1.8 million tonnes of grain, and 5.5 million tonnes of iron ore which is railed from Koolyanobbing.
In 2007, the deaths of thousands of wild birds alerted residents to a toxic hazard which was found to be the unsafe transport by truck and rail of lead ore from Wiluna for export by ship. When elevated levels of lead were measured in a number of adults and children, as well as in water tanks, a multimillion-dollar cleanup was paid for by the state government. The miner, Magellan Metals, was banned from exporting lead through the port.
A parliamentary inquiry presented its report in November 2007. Before long, additional concerns were raised about pollution caused by nickel dust escaping from exported ore. In October 2008, the Esperance Port Authority banned the export of nickel after emission targets were exceeded twice, but the ban, which threatened Western Australia's $8 billion nickel industry, was overturned by the newly elected Premier of Western Australia, Colin Barnett.
The local newspaper for the Esperance region is The Esperance Express, published by Fairfax Media. It is published bi-weekly on Wednesday and Friday.Beatles guitarist George Harrison visited a property at Condingup, a farming region near Esperance
West Coast Eagles 2006 Premiership player Quinten Lynch lives in Grass Patch, a farming region of Esperance.
Former Neighbours actor Dan Paris was raised in Esperance and works as a photographer and helps with the harvest season in surrounding farms.