Prior to British settlement, the Cairns area was inhabited by the Walubarra Yidinji people, who still recognise their indigenous property rights. The area is known in the local Yidiny language as Gimuy.
In 1770, James Cook first mapped the future site of Cairns, naming it Trinity Bay. Closer investigation by several official expeditions 100 years later established its potential for development into a port.
Cairns was founded in 1876, hastened by the need to export gold discovered on the tablelands to the west of the inlet. The site was predominantly mangrove swamps and sand ridges. The swamps were gradually cleared by labourers, and the sand ridges were filled in with dried mud, sawdust from local sawmills, and ballast from a quarry at Edge Hill. Debris collected from the construction of a railway to Herberton on the Atherton Tableland, a project which started in 1886, was also used. The railway opened up land that was later used for agriculture on the lowlands (sugar cane, corn, rice, bananas, pineapples), and for fruit and dairy production on the Tableland. The success of local agriculture helped Cairns to establish itself as a port, and the creation of a harbour board in 1906 helped to support its economic future.
During World War II, Cairns was used by the Allied Forces as a staging base for operations in the Pacific, with US Army Air Force and Royal Australian Air Force operational bases (now the airport), as well as a major military seaplane base in Trinity Inlet, and US Navy and Royal Australian Navy bases near the current wharf. Combat missions were flown out of Cairns in support of the Battle of the Coral Sea in 1942. Edmonton and White Rock south of Cairns were major military supply areas and US Paratroopers trained at Gordonvale and the Golds borough Valley.
A Special Forces training base was established at the old "Fairview" homestead on Munro's Hill, Mooroobool. This base was officially known as the Z Experimental Station,