Alexander Wilson Hogg was born at Glasgow, Scotland, on 9 February 1841, the son of Donald Hogg, a dyer, and his wife, Janet Dunn, both of highlander stock. Alexander's first school was one the dyeworks provided for its workers' children; he later moved to a private school. In both he was taught by lively, competent dominies who gave him a lifelong interest in education. Before he was 12 he began work as a junior clerk, first briefly for a merchant and then at the dyeworks. When he was 14, shortly after his mother's death, the family emigrated to Victoria, Australia.
They went immediately to the goldfields where for nearly 20 years Alexander had a richly varied experience of gold-digging, storekeeping and journalism, working sometimes for others, sometimes on his own account. For a period he joined his father who had left digging to go farming. He was also involved at some stage in the formation of a miners' protection league. On 12 December 1870 at Geelong, Hogg married Margaret Gibson.
About 1876 Hogg crossed to New Zealand, and was soon engaged in journalism, working successively as a reporter for the Otago Guardian and as editor of the short-lived Dunedin Age, the Ashburton Mail and the South Canterbury Times. At Dunedin on 7 November 1878, describing himself as a 'bachelor', he married Bedelia Christie. The following year, Margaret Hogg married again in Sydney. She gave her marital status as 'widow'.
In 1884 Alexander and Bedelia Hogg and their young family moved to Masterton. Hogg became part owner of the Wairarapa Star, which he edited until 1892. In Wairarapa he soon became a leading spokesman for the working class and the small settler, a strenuous opponent of land monopoly and a strong advocate of education for the people. His political views probably owed something to his Scottish childhood, but more to his involvement in the Victorian digger–squatter struggles. He served on numerous local bodies. Encouraged by John Ballance and Sir George Grey, he contested the Masterton electorate as a Liberal candidate in 1887 and won the seat in 1890.
For Hogg the land was the people's national asset and he advocated the perpetual lease as the best defence against land monopoly. In the House of Representatives and as a member of the Wellington Land Board from 1891 to 1904, he tussled repeatedly with the large runholders while supporting any measures likely to advance the smallholders' interests. He became a mentor to the settlement associations that were steadily occupying the Wairarapa bush. The roads so vital to these settlers received his constant attention. He gloried in being designated a 'roads-and-bridges member'. From 1902 to 1905 he chaired the parliamentary lands committee.
Hogg enthusiastically supported the establishment of Victoria College and was appointed to its first council in 1897. He was a member of the Wellington Education Board from 1897 until his death and became a leader of the strong group of parliamentarians defending the boards against encroachments from the Department of Education. In 1901 he chaired a royal commission to advise on primary school staffing and salaries and spent 14 weeks touring the country to collect evidence. The commission had resulted from the department's advocacy, under its new director, George Hogben, of a national staffing and salaries scheme. Hogg saw Hogben as an iconoclastic new broom, bent on sweeping away the people's freedom as expressed through the education boards. During the commission's tour Hogg grasped that as the boards' parliamentary grants were based on school attendances, a small school inevitably ran at a loss even with a pitifully paid teacher and minimal facilities. Realising that boards with a predominance of small rural schools had sadly impoverished systems and that a uniform salary scale would address this evil, Hogg became a supporter of Hogben's reforms. His about-face ensured the passage of the 1901 Public-School Teachers' Salaries Act.
Hogg made few such concessions. While his party awkwardly attempted to adjust to changing times, he held firmly to his strongly democratic agrarian views, expressing them partly in a deep suspicion of urban bureaucrats. In 1901 he took a leading role in the campaign that forced the retirement of the veteran Wellington school inspector Robert Lee. When in January 1909 he joined Joseph Ward's cabinet, he spent little time with the bureaucrats of the Labour and Customs departments but entered with zest into extensive tours among the back-country settlers in the interests of his other portfolio, roads and bridges.
Office soon brought Hogg disillusionment: he found Ward's running of the cabinet autocratic, and a recession thwarted his roads and bridges ambitions. He began expressing his frustrations, first in public, and then – disastrously – in the House, where, on 12 June 1909, he called for a state note issue (abhorrent to the financial institutions) and radical land reforms (anathema to the growing ranks of freeholders). Following vociferous calls from colleagues and the press, Ward asked for his resignation from the cabinet. Hogg then travelled around New Zealand giving speeches on his radical land and currency policies to large, enthusiastic crowds. But when he stood as an independent at the 1911 election he found that Masterton electorate was no longer with him. He died at Masterton on 17 November 1920, survived by his wife and four daughters. Two sons had predeceased him.