William Meldrum was born into a comfortably off farming family at Whangarei, New Zealand, on 28 July 1865, the son of Margaret Barr and her husband, Alexander Lewis Meldrum. William was educated at Kamo School, in Scotland, at Auckland College and Grammar School and at Auckland University College, where he read law. He served a legal apprenticeship from 1883 to 1887 with Whitaker and Russell, and was admitted as a barrister and solicitor in 1889. Meldrum practised in Hunterville from 1891 to 1912, then sold the practice and took up land there and in Waipukurau. From 1909 to 1914 he chaired the Hunterville Town Board. He represented Auckland in cricket (1884–87) and rugby (1886), and became New Zealand chess champion in 1896. He married Nora Elizabeth Carthew on 24 April 1894 at New Plymouth; they were to have two children.
Meldrum's distinguished military career began in 1900 when he formed and then joined as second lieutenant the Hunterville Mounted Rifle Volunteers. By March 1914, through study and ability, he had become lieutenant colonel commanding the 6th (Manawatu) Mounted Rifles Regiment. When the New Zealand Expeditionary Force was sent to Gallipoli in 1915, he commanded the Wellington Mounted Rifles Regiment, who fought as infantry. At least once he refused to advance against entrenched machine-guns at short range, and also secured permission to withdraw from a highly exposed post. His detailed reconnaissance, sounding out of subordinates, careful planning, clear orders, and emphasis on speed and silence led to the capture of the critical Table Top prior to the assault on Chunuk Bair. He relieved the Wellington Battalion on Chunuk Bair and, knowing the position's significance, held it for 24 hours under almost continuous attack from rifles, bombs and machine-guns at close range, demonstrating great courage, tenacity and leadership.
In 1916, during the Sinai campaign, Meldrum temporarily commanded with distinction the 2nd Australian Light Horse Brigade when its brigadier was wounded. Later, at the battle of Rafah, Meldrum's Wellington Mounted Rifles Regiment held off Turkish relief columns, cleared the sandhills between Rafah and the sea, supported the Canterbury Mounted Rifles Regiment in its assault, and served as the rearguard to cover the collection of wounded and prisoners. In the first battle of Gaza the regiment penetrated the town's outskirts. At the second battle, Meldrum's thorough and thoughtful planning, with close co-ordination of infantry and artillery, led to further success.
Appointed brigadier general commanding the New Zealand Mounted Rifles Brigade on 23 April 1917, Meldrum led and co-ordinated his units methodically and quickly in the encirclement of Beersheba. One of the brigade's most brilliant actions was at Ayun Kara, near Jaffa, where heights were taken and held against more numerous and very determined defenders. In the raid on Amman, the brigade was employed both as an assault and a rearguard force in hard driving rain, over rugged country and with only meagre supplies. All ranks trusted him and he them.
Although sympathetic to his men's minor foibles, Meldrum applied the law rigorously to violent offences and was angered if his judgements were questioned. He sent a written protest when British authorities commuted the sentence he had imposed on a man who had severely injured an Egyptian. His troops let him down badly by the massacre at Surafend in December 1918. In retaliation for the murder of a New Zealand soldier, New Zealand, Australian and British troops burned a nearby village and beat to death 20 of its men. The number of troops involved, and the tacit condoning of the massacre by junior officers, made investigation and punishment impossible.
Meldrum was much decorated: he was appointed CB, CMG, DSO, and member of the Serbian Order of the White Eagle, and was awarded the Colonial Auxiliary Forces Officers' Decoration.
He returned to New Zealand to face personal crisis. His wife had left him, and low wool prices caused him to sell his farms and invest the proceeds in gold-dredging ventures; these failed in the 1930s. For a short while he practised law in New Plymouth. At Palmerston North on 17 June 1927, two days after securing a divorce, he married Clare Beatrice Dodson, who had been keeping house for him; they were to have two daughters and a son.
From 1921 to 1934 Meldrum served as a magistrate in Greymouth, where he appears to have been forgiving to former servicemen and indulgent of the West Coast habit of ignoring the six o'clock closing hour for licensed premises. From 1935 to 1938 he was mayor of Greymouth. He also served as group director of the Home Guard, Greymouth and Westport (1941–42), chairman of the local Armed Forces Appeal Board (1942–44), and president of the West Coast Justices of the Peace Association. He played chess, golf and bowls and fished. In later years he benefited from the financial generosity of former mounted riflemen when he fell on hard times; many of them regularly turned up for his birthdays. He died at Burnham Camp, while visiting his son, on 13 February 1964, and was survived by his second wife and four children.
William Meldrum had always made the care of his men a major concern. In his later years he told his officer son always to remember that New Zealand lives were precious. Excepting the assault on Chunuk Bair, his casualty rate was always low – despite his nickname 'Fix-Bayonets Bill'. His tactical ability and the record in battle of the New Zealand Mounted Rifles Brigade would have fitted this personally modest man for divisional command had the opportunity arisen.