Henry Brougham Farnie (8 April 1836 – 21 September 1889), often called H. B. Farnie, was a British librettist and adapter of French operettas and an author. Some of his English-language versions of operettas became record-setting hits on the London stage of the 1870s and 1880s, strongly competing with the Gilbert and Sullivan operas being played at the same time.
After attending Cambridge University, Farnie returned to his native Scotland, where he was appointed editor of the Cupar Gazette. In 1857, he wrote The Golfer's Manual, the first book on golf instruction. In 1860, he wrote books on the flora of St. Andrews and on The City of St. Rule. His journalism career brought him to London in 1863 as editor of a new musical journal, The Orchestra. He began to write the lyrics to popular songs, and, in 1867, he began to write plays. During the 1870s and 1880s, Farnie turned out translations and adaptations of dozens of French operas and operettas. Many of the latter had long and successful runs. Among his few enduring lyrics is the "Gendarmes' Duet", adapted from Offenbach's Geneviève de Brabant.
Farnie was born in Burntisland, Fife, Scotland, one of seven children of James Farnie and the former Margaret Paterson Cairns. He was named after the Whig statesman Lord Brougham, to whom the family claimed to be related. Farnie was educated at St. Andrews University, where he won a prize that took him to Cambridge University. After leaving Cambridge, he returned to Scotland, where he was appointed editor of the Cupar Gazette. In 1857, Farnie wrote the first book on golf instruction, The Golfer's Manual: being an historical and descriptive account of the national game of Scotland, under the pseudonym, "A Keen Hand". He also wrote the Handy book of St. Andrews about the flora of that area of Scotland, and The City of St. Rule with calotypes by Thomas Rodger (1860).