James Alexander Bonar and his twin sister, Anne, were born in Edinburgh, Scotland, on 12 June 1840, the children of Archibald Bonar, a banker, and his wife, Sophia Robertson. James was educated at the Edinburgh Academy, and in 1854 the family emigrated to Melbourne, Australia, where he was employed by James Henty and Company, general merchants.
James Bonar and his father arrived in New Zealand in 1863 and James commenced business in Invercargill as a general merchant under the name Henderson and Bonar. In March 1865 he and his father moved to the West Coast and James set up as a shipping agent and businessman in Hokitika. He became a licensed custom house agent in 1869 and in the same year was appointed a trustee of the Hokitika Savings Bank. On the death of his father in 1872 he became manager of the bank. Bonar held the agency for McMeekan, Blackwood and Company's steamships. Subsequently this firm sold out to the Union Steam Ship Company of New Zealand and Bonar took over that agency. He was also the Lloyd's agent at Hokitika. He had his own interests in ships, most notably the Waipara, which serviced the West Coast. He invested in mining ventures at Ross, Hokitika and Reefton, and was a director of several companies.
James Bonar served on many public bodies in Westland. He was a prominent member of an Improvement Committee, formed in Hokitika in April 1865, which succeeded in establishing a new hospital, a new gaol and a volunteer fire brigade. He became the first chairman of the Hokitika Municipal Council in 1866 and first mayor of Hokitika in 1867. He declined to stand as a candidate when Westland gained parliamentary representation in 1866.
Bonar was appointed secretary for the goldfields and a member of the Executive Council of Canterbury in 1867 and was then elected to represent Hokitika on the Canterbury Provincial Council. In February 1868 he was elected to the council of the newly instituted County of Westland, although he had not been enthusiastic about its separation from Canterbury. When John Hall resigned as chairman, the government appointed Bonar in his place. In March he swore in 640 special constables to suppress an Irish nationalist procession in Hokitika, but was censured by goldfields representatives for not seeking councillors' advice. When, following fresh elections, the council met in 1869, the same representatives, hostile to the merchants of Hokitika and to Bonar personally, replaced him as chairman with Conrad Hoos. The new council raised a substantial overdraft to finance public works. Bonar's plea for financial prudence went unheeded and the affairs of the council were soon in a state of chaos.
On 27 June 1868 Bonar was appointed to the Legislative Council. He did not restrict his participation in debate to matters affecting Westland; his contribution was wide ranging. He was opposed to Richard Seddon's old-age pension scheme on the grounds that it was not affordable in the long term. Bonar was present for at least one period of each session, but cited the complexity of travel from the West Coast to Wellington as a barrier to regular attendance.
When Westland became a separate province, Bonar was elected as its first and only superintendent on 17 January 1874. In this capacity he was responsible for persuading the general government to provide £20,000 to establish a special settlement at Jackson Bay in 1874–75. Cheap land was made available but the 367 settlers were defeated by a combination of isolation, geography and climate. A commission of inquiry in 1879 found that most of the complaints came from people seeking someone to blame for the settlement's failure, and rejected the suggestion that Bonar had profited unfairly by using the Waipara to provision Jackson Bay. The settlement had been virtually abandoned by the 1880s.
Bonar was deeply involved in community affairs in Hokitika. He was appointed a justice of the peace in 1867, and during a distinguished career in the volunteers, commanded the Westland district. He was awarded the Imperial Volunteer Officers' Decoration in 1895. Bonar was a visiting justice of the Hokitika gaol, official visitor to Hokitika Lunatic Asylum, president of Hokitika Hospital, chairman of the school commissioners for the Westland Provincial District and of the Hokitika Harbour Board, and chairman of directors of the Hokitika Gas Company. He was also president of the Hokitika Cricket Club. He is commemorated in the Bonar Glacier on Mt Aspiring, and in Mt Bonar and Bonar Creek in south Westland.
On 19 October 1875 in Melbourne, Bonar had married Elliot (known as Ella) Margaret Bell; there were five sons of the marriage. He died at Wellington on 7 November 1901. His long years of service to the West Coast were reflected in the crowds attending his funeral and in the fulsome parliamentary tribute paid to him by Seddon. Ella Bonar died in 1913.