Walker was born in Scotland but spent his early childhood in New South Wales, before returning to Scotland with his family to study finance. Joining the Bank of New South Wales, he returned to Australia and held various financial positions in New South Wales and Queensland. Gaining a public reputation for financial expertise, he was active in the Federationist cause and was a delegate to the 1897 Constitutional Convention, where he was a significant figure in the development of Commonwealth finance schemes. After assisting the successful "Yes" campaign for the 1898 referendum, he was elected to the Senate in 1901 as a Free Trader.
As a senator, Walker continued to focus on finance, although his views on social policy sometimes saw him on the outside of his party. He supported the White Australia policy but disagreed with key elements, and was a leader in opposition to the dictation test, by which a potential immigrant was required to pass a test in any European language before their application was accepted. He also campaigned for a transcontinental railway and for a capital city to be located on federal territory. Attempts to guide financial reform through the parliament as a backbench senator led to frustration, and Walker retired due to ill health in 1913 with his legislation unpassed.
Walker was born on Leith Walk in Edinburgh to grazier John William Walker and his wife Elizabeth, née Waterston. The family migrated to New South Wales in 1844 and settled on Castlereads Station near Boorowa. In 1849, John Walker sold the property to Hamilton Hume and returned to Scotland. James was educated at the Edinburgh Institution and King's College London before returning to Edinburgh in 1857. After several years in Scotland working first for the paper manufacturers Cowan & Sons, and then for stockbroker Robert Allan, he joined the Bank of New South Wales' London branch in March 1860; his cousin, Thomas Walker, was one of the bank's directors. In January 1862 he departed for Melbourne on Swiftsure and was posted to the bank's Sydney office.
Walker was then sent by the bank to Rockhampton in Queensland, where he worked as an accountant until 1866 when he was appointed manager of the Townsville branch. In 1867 he was transferred to the Toowoomba branch, which he managed until 1878 when he was promoted assistant inspector in Brisbane. He married Janette Isabella Palmer on 16 April 1868 at Range View. In 1885 he resigned from the Bank of New South Wales to become the first manager of the Royal Bank of Queensland, but in 1887 he returned to New South Wales to manage the estate of Eadith Walker, the daughter of his late cousin Thomas.
Walker had a strong interest in Federation and was a member of the Australasian Federation League of New South Wales. In 1896 he attended the People's Federal Convention in Bathurst, where he proposed a financial scheme that would provide savings for a federal government based on income from state taxes and federal spending. His reputation for financial expertise saw him elected to the Australian Federal Convention in 1897. There he supported equal representation for all states in an upper house, Commonwealth control of railways, and a national capital on federal territory. He reiterated his financial proposals, but was overlooked for the finance and trade committee, having been described by Alfred Deakin as "a mere commercial man".
Despite this setback, Walker continued to play an active part in the development of the Australian Constitution. He had the name of the federal upper house changed from the "States Assembly" to the Senate, although his proposal that the federated colonies adopt the name "Commonwealth of Australasia", with a view to the future inclusion of New Guinea, New Zealand and Fiji, was not adopted. He also supported a minimum age for senators of twenty-five, rather than twenty-one, and voted for Paddy Glynn's proposal to include recognition of a "Divine Sovereign" in the Constitution.
The second session of the Convention took place in Sydney in September 1897. Walker was appointed to a subcommittee on federal finance, which proposed a financial scheme based on Walker's Bathurst proposal that was adopted by the Convention. He was active in the Federation referendum campaign, travelling around New South Wales to encourage a "Yes" vote. He mostly focused on financial issues, and in 1899 went to Western Australia, the most reluctant colony, to increase support.
Following the success of the referendum, Walker was encouraged to stand for the Senate by a petition of over 6500 signatures. A staunch free trader, Walker campaigned as part of the Free Trade Party's endorsed ticket. He had resigned as president of the Bank of New South Wales in 1897, but remained a director. At the first federal election in March 1901, Walker was elected as a New South Wales Senator at the head of the poll.
As a senator, Walker devoted his support to a variety of causes, including a transcontinental railway and equal pay for women. He opposed a federal old-age pension scheme on the grounds of lack of funds, and also opposed the Immigration Restriction Bill, although he supported the White Australia policy in principle. He opposed the proposed form of the dictation test and supported James Macfarlane's amendment requiring the test to be administered in a language known to the immigrant, moving his own amendment after Macfarlane's was defeated. He also expressed reservations about the deportation of Kanaka labourers, supporting the reduction in their use but advocating that those resident in Australia for at least five years be permitted to remain. He vigorously opposed compulsory arbitration, and voted against the Conciliation and Arbitration Bill.
Re-elected as an Anti-Socialist in 1906, Walker expressed the view that the three-party system of the Australian Parliament's first decade was dysfunctional, and implored electors to vote "for either socialism or anti-socialism, and so end this triangular government". He continued to support the transcontinental railway and lamented the slow progress of the decision on a site for the federal capital, and supported a higher rate of immigration and the watering down of the Immigration Restriction Act. In 1908, he introduced the Commonwealth Companies Reserve Liabilities Bill, which permitted special reserve funds for banks to assist shareholders during a financial crisis, and in 1910 followed with the similar Commonwealth Banking Companies Reserve Liabilities Bill. He complained of the difficulty of passing private senators' bills, and at the 1913 election he retired, suffering from ill health.
Walker maintained an interest in politics after his retirement, and remained a director of the Bank of New South Wales until 1921. He had been president of the Australian Golf Club (1903–19), a director of the Royal Prince Alfred Hospital, and a member of the Presbyterian Church's finance committee. A fellow of the Institute of Bankers in London since 1886 and vice-president of the Australian Economic Association, he also continued as a director of the Australian Mutual Provident Society and a councillor of St Andrew's College at the University of Sydney. Walker died on 18 January 1923 at Woollahra in Sydney, and was survived by his wife and five of their seven children. Buried at South Head Cemetery, his estate at his death was worth £27,697.