In 1770, Captain James Cook discovered the coast of eastern Australia and claimed it for Great Britain under the name of New South Wales. Settlement—the first in Australia—began in 1788 with a prison colony which was named for Lord Sydney, the British home secretary. The British government sent convicts to the colony until 1841. Many free settlers came also.

New South Wales was granted a partially elective council in 1842 and was given self-government in 1855. The discovery of gold in 1851 brought in many new settlers. The colony of Victoria was separated from New South Wales in 1851, and Queensland was set apart in 1859. The colony became part of the Commonwealth of Australia in 1901. In 1911, New South Wales ceded to the commonwealth the land that became the inland portion of the Australian Capital Territory, and it transferred the Jervis Bay area to the federal government in 1915. During the 20th century, New South Wales became Australia's most populous, urbanized, and industrialized state.