Hornung was born Ernest William Hornung on 7 June 1866 at Cleveland Villas, Marton, Middlesbrough; he was nicknamed Willie from an early age. He was the third son, and youngest of eight children, of John Peter Hornung (1821-86) and his wife Harriet né e Armstrong (1824-96). John was christened Johan Petrus Hornung in the Transylvania region of Hungary and, after working in Hamburg for a shipping firm, had moved to Britain in the 1840s as a coal and iron merchant. John married Harriet in March 1848, by which time he had anglicised his name. At the age of 13 Hornung joined St Ninian' s Preparatory School in Moffat, Dumfriesshire, before enrolling at Uppingham School in 1880. Hornung was well liked at school, and developed a lifelong love of cricket despite limited skills at the game, which were further worsened by bad eyesight, asthma and, according to his biographer Peter Rowland, a permanent state of generally poor health.