Cook was born in Silverdale, Staffordshire, England. He began working in the local coal mines at the age of nine. Cook emigrated to Australia in 1885, settling in Lithgow, New South Wales. He became involved with the local trade union movement, serving as an official for a miners' union. In 1891, Cook was elected to the New South Wales Legislative Assembly as a representative of the fledgling Labor Party. He was elected leader of the party in 1893, but the following year left due to a policy dispute. Cook subsequently joined the Free Trade Party, and from 1894 to 1899 served as a government minister under George Reid.
In 1901, Cook was elected to the new federal parliament representing the Division of Parramatta. He became deputy leader of the federal Free Trade Party, again under George Reid, and in 1908 replaced Reid as leader (by which time the party had been renamed the Anti-Socialist Party). In 1909, Cook agreed to merge his party with the Protectionist Party of Alfred Deakin, in order to form a unified opposition to Labor. He became deputy leader of the new Commonwealth Liberal Party, and served as Minister for Defence in Deakin's government from 1909 to 1910.
Cook replaced Deakin as leader of the Liberal Party in January 1913, and a few months later won a one-seat majority over Andrew Fisher's Labor Party at the 1913 election. The Liberals failed to secure a senate majority however, and Cook called a new election for September 1914 (the first double dissolution). He was defeated, with Fisher returning as prime minister. Cook achieved little as prime minister, but did oversee the early stages of Australia's involvement in World War I.
In 1917, Cook and the Liberals merged into the new Nationalist Party, along with Billy Hughes and his National Labor Party supporters. He served as Nationalist deputy leader until his retirement from parliament in 1921, and in the Hughes government was Minister for the Navy (1917–1920) and Treasurer (1920–1921). After leaving politics, Cook served as High Commissioner to the United Kingdom from 1921 to 1927. He died at the age of 86, and was one of the last survivors of the first federal parliament.
Cook was born Joseph Cooke to William and Margaret (née Fletcher) Cooke, in Silverdale, a small mining town near Newcastle-under-Lyme. He had no formal education and worked in the coal mines from the age of nine. As a result of the Elementary Education Act, 1870, Cook was compelled to return to his desk at the village school, St. Luke's Church of England School. His short experience in the local coal mine taught him to appreciate what he had been missing in school, and aided by his headmaster Edwin Smitheman, and the staff, the young man's intellectual activity was quickly stimulated.
At the age of twelve, Joseph left school a second time and returned to his former employment at the local colliery. However, as a result of Smitheman's attention, together with that of his parents, an exceptionally strong ambition to improve his position became implanted in him. This ambition was to become one of his most prominent characteristics, revealed first in a drive for self-improvement and, later on in life, his determination to succeed in politics. During his teenage years, he embraced Primitive Methodism, and marked his conversion by dropping the "e" from his surname. On 8 August 1885, he married Mary Turner at Wolstanton, Staffordshire, and the couple eventually had five sons and three daughters.
Shortly after their marriage, the couple emigrated to New South Wales and settled in Lithgow, joining Cook's brother-in-law and a number of other former miners from Silverdale. Cook worked in the coal mines, becoming General-Secretary of the Western Miners Association in 1887. In 1888, he participated in demonstrations against Chinese immigration. He was also active in the Land Nationalisation League, which was influenced by the ideas of Henry George and strongly supported free trade, and was a founding member of the Australian Labor Party in 1891.
Cook was elected to the New South Wales Legislative Assembly as MP for the coalfields seat of Hartley in 1891, in Labor's first big breakthrough in Australian politics. It was the first time Labor had won a seat in any parliament in Australia.
In 1894, however, Cook was the leader of those parliamentarians who refused to accept the Labor Party's decision to make all members sign a "pledge" to be bound by decisions of the Parliamentary Labor Party (Caucus). Cook's protest was based on Labor's attitude to the tariff question in particular, with his preference for free trade being increasingly at odds with his party. By the end of the year, he had become a follower of George Reid's Free Trade Party, and for years afterwards he was seen as a 'class traitor' by Labor. Cook's conversion to liberal economics was immediately rewarded with the post of Postmaster-General in Reid's government from 1894–99. Cook became an invaluable ally of Reid, despite the fact that the two men had distinctly different characters, and remained colleagues only at a distance.
At the first Australian federal election in 1901, Cook was elected unopposed as member for Parramatta, a seat which then included the Lithgow area. By this time, there was very little left of Cook's roots in Labor. He became deputy leader of the Free Trade Party, but did not hold office in Reid's 1904–05 ministry, mainly because Reid needed to offer portfolios to independent Protectionist members.
When Reid resigned as party leader on 16 November 1908, Cook succeeded him the following day, and agreed to merge the Anti-Socialist Party (the Free Trade Party had been renamed prior to the 1906 federal election) with Alfred Deakin's Protectionists, in an effort to counter Labor's popularity. Reid became deputy leader of the new Commonwealth Liberal Party, also known as "the Fusion." Cook served as Defence Minister in Deakin's 1909–1910 ministry, then succeeded Deakin as Liberal leader when the government was defeated by Labor in the 1910 elections. Cook had, by this time, become completely philosophically opposed to socialism.
At the 1913 election, the Commonwealth Liberal Party led by Cook won a one-seat majority in the House of Representatives over the Labor Party, led by Andrew Fisher, and Cook became the sixth Prime Minister of Australia. However, Labor still had a majority in the Senate. Unable to govern effectively due to the hostile Senate, Cook decided to trigger a double dissolution under section 57 of the Constitution of Australia. He introduced a bill abolishing preferential employment for trade union members in the public service. As expected, the Senate rejected the bill, giving Cook an excuse to seek a double dissolution.
World War I broke out in the middle of the resulting campaign for the September 1914 election. Andrew Fisher was able to remind voters that it was Labor that had favoured an independent Australian defence force, which the conservatives had opposed. Cook was defeated after a five-seat swing, and Fisher's Labor Party resumed office.
After Fisher resigned from parliament in 1915, Billy Hughes became Labor leader and prime minister. In 1916, Hughes began a determined push for the introduction of conscription for military service, causing a split in the Labor Party over the issue. However, Hughes was able to stay in office after getting parliamentary support from Cook and his party. Later in 1916, the so-called National Labor Party, consisting of those Labor members who supported Hughes, merged with the Commonwealth Liberals to form the Nationalist Party. Although it was dominated by former Liberals, Hughes was named the new party's leader, with Cook as deputy leader. Cook became Minister for the Navy in Hughes' reconfigured government. The Nationalists had substantial victories over Labor in the 1917 election and the 1919 election.
Cook was part of the Australian delegation at the Paris Peace Conference where he defended the White Australia Policy and supported Australia's annexation of German New Guinea. He gave up the Navy portfolio in favour of becoming Treasurer (finance minister) from 1920–21.
Cook resigned from Parliament in 1921 and was appointed Australian High Commissioner in London, where he served until 1927. During 1928 and 1929, he headed a Royal Commission into the effects of federation on South Australia. He died at Bellevue Hill, Sydney in 1947, aged 86, the last surviving member of Deakin's 1909-1910 cabinet. He was cremated and his ashes interred at Northern Suburbs Memorial Gardens, North Ryde.
Cook was appointed to the Privy Council on 16 July 1914. He was knighted in 1918 as Knight Grand Cross of the Order of St Michael and St George (GCMG).
In 1972, he was honoured on a postage stamp bearing his portrait issued by Australia Post.
Cook is the only (eligible) Prime Minister who does not have a federal electorate named after him. Although there is a seat called Cook, that was named not after the Prime Minister but after Captain James Cook. To resolve the problem, the Australian Electoral Commission stated at the 2009 Federal redistribution of New South Wales that the seat was now considered to be named for both of them.