He was educated at the South African College, and at an early age turned his attention to politics, first as a journalist. He was editor of the Zuid Afrikaan till its incorporation with Ons Land, and of the Zuid Afrikaansche Tijdschrift. By birth, education and sympathies a typical Dutch Afrikaner, he set himself to organize the political power of his fellow-countrymen. This he did very effectively, and when in 1879 he entered the Cape parliament as member for Stellenbosch, he became the real leader of the Dutch party. Yet he only held office for six months--as minister without portfolio in the Scanlen ministry from May to November 1881. He held no subsequent official post in the colony, though he shared with Sir Thomas Upington and Sir Charles Mills the honor of representing the Cape at the intercolonial conference of 1887. Here he supported the proposal for entrusting the defence of Simon's Town to Cape Colony, leaving only the armament to be provided by the imperial government, opposed trans-oceanic penny postage and moved a resolution in favor of an imperial customs union. At the colonial conference of 1894 at Ottawa he was again one of the Cape representatives. In 1888 and in 1889 he was a member of the South African customs conference.

His chief importance as a public man was, however, derived from his power over the Dutch in Cape Colony, and his control of the Afrikaner Bond. In 1878 he had himself founded the Farmers' Association Zuidafrikaansche Boeren Beschermings Vereeniging, and as the Cape farmers were almost entirely Dutch the Association became a centre of Dutch influence. When the Bond was formed in 1882, with purely political aims, Hofmeyr made haste to obtain control of it and in 1883 amalgamated the Farmers Association with it Under his direction the constitution of the Bond was modifier by the elimination of the provisions inconsistent with loyalty to the British crown. But it remained an organization for obtaining the political supremacy of the Cape Dutch. His control over the Bond enabled him for many years, while free from the responsibilities of office, to make and unmake ministers at his will, and earned for him the name of Cabinet-maker of South Africa. Although officially the term Afrikander was explained by Hofmeyr to include white men of whatever race, yet in practice the influence of the Bond was always exerted in favor of the Dutch, and its power was drawn from the Dutch districts of Cape Colony. The sympathies of the Bond were thus always strongly with the Transvaal, as the chief centre of Dutch influence in South Africa; and Hofmeyr's position might in many respects be compared with that of Parnell at the head of the Irish Nationalist party in Great Britain. In the Bechuanaland difficulty of 1884 Hofmeyr threw all the influence of the Bond into the scale in favor of the Transvaal. But in the course of the next few years he began to drift away from President Kruger. He resented the reckless disregard of Cape interests involved in Kruger's fiscal policy; he feared that the Transvaal, after its sudden leap into prosperity upon the gold discoveries of 1886, might overshadow all other Dutch influences in South Africa; above all he was convinced, as he showed by his action at the London conference, that the protection of the British navy was indispensable to South Africa, and he set his face against Kruger's intrigues with Germany, and his avowed intention of acquiring an outlet to the sea in order to get into touch with foreign powers.

In 1890 Hofmeyr joined forces with Cecil Rhodes, who became premier of Cape Colony with the support of the Bond. Hofmeyr's influence was a powerful factor in the conclusion of the Swaziland convention of 1890, as well as in stopping the trek to Banyailand (Rhodesia) in 1891, a notable reversal of the policy he had pursued seven years before. But the reactionary elements in the Bond grew alarmed at Rhodes's imperialism, and in 1895 Hofmeyr resigned his seat in parliament and the presidency of the Bond. Then came the Jameson Raid, and in its wake there rolled over South Africa a wave of Dutch and anti-British feeling such as had not been known since the days of Majuba. (The proclamation issued by Sir Hercules Robinson disavowing Jameson was suggested by Hofmeyr, who helped to draw up its terms.) Once more Hofmeyr became president of the Bond. By an alteration of the provincial constitution, all power in the Cape branch of the Bond was vested in the hands of a vigilance committee of three, of whom Hofmeyr and his brother were two. As the recognized leader of the Cape Dutch, he protested against such abuses as the dynamite monopoly in the Transvaal, and urged Kruger even at the eleventh hour to grant reasonable concessions rather than plunge into a war that might involve Cape Afrikanderdom and the Transvaal in a common ruin. In July 1899 he journeyed to Pretoria, and vainly supported the proposal of a satisfactory franchise law, combined with a limited representation of the Uitlanders in the Volksraad, and in September urged the Transvaal to accede to the proposed joint inquiry. During the negotiations of 1899, and after the outbreak of war, the official organ of the Bond, Ons Land, was conspicuous for its anti-British attitude, and its violence forced Lord Roberts to suppress it in the Cape Colony district under martial law. Hofmeyr never associated himself publicly with the opinions expressed by Ons Land, but neither did he repudiate them. The tide of race sympathy among his Dutch supporters made his position one of great difficulty, and shortly after the outbreak of war he withdrew to Europe, and refused to act as a member of the Conciliation Committee which came to England in 1901 in the interests of the Boer republics.

Towards the close of the war Hofmeyr returned to South Africa and organized the Bond forces for the general election held in Cape Colony at the beginning of 1904, which resulted in the defeat of the Bond party. Hofmeyr retained his ascendancy over the Cape Dutch, but now began to find himself somewhat out of sympathy with the larger outlook on South African affairs taken by the younger leaders of the Boers in the Transvaal. During 1906 he gave offence to the extreme section of the Bond by some criticisms of the taal and his use of English in public speeches. At the general election in 1908 the Bond, still largely under his direction, gained a victory at the polls, but Hofmeyr himself was not a candidate. In the renewed movement for the closer union of the South African colonies he advocated federation as opposed to unification. When, however, the unification proposals were ratified by the Cape parliament, Hofmeyr procured his nomination as one of the Cape delegates to England in the summer of 1909 to submit the draft act of union to the imperial government. He attended the conferences with the officials of the Colonial Office for the preparation of the draft act, and after the bill had become law went to Germany for a cure. He returned to London in October 1909, where he died on the 11th of that month. His body was taken to Cape Town for burial.