Following the outbreak of the First World War in 1914, Hornby was sent to France with the British Expeditionary Force, as second-in-command of C Squadron of the 4th Dragoon Guards, under Major Tom Bridges. His squadron became the first unit of the BEF to engage the German army outside Mons, Belgium on 22 August 1914. The squadron was guarding the road from Mons to Soignies, near the village of Casteau to the north-east of Mons. Two troops were dismounted in ambush, and two in reserve commanded by Hornby. Four patrolling German lancers—4th Cuirassiers of the 9th Cavalry Division—were reconnoitring the route around 6am on 22 August, as the advance guard of General Alexander von Kluck’s 1st Army which was about to advance on Mons. Sensing danger, the German cavalrymen retreated and were pursued by Hornby's two reserve troops, the 1st Troop leading with swords drawn and the 4th Troop following. The Germans retreated towards a larger force of German lancers, which Hornby charged with his men. Hornby is said to have been the first to kill one of the German cavalrymen, fighting on horseback with sword against lance, reputedly using a 1908 pattern trooper's sword now held by the museum of the Yorkshire Regiment. After further pursuit, the Germans turned to shoot at the British cavalry, supported by a force of jägers. The 4th Troop dismounted to provide covering fire for the 1st Troop, and Drummer Edward Thomas is reputed to have fired the first shot of the war for the British Army, hitting a German cavalryman. For his efforts, Captain Hornby was awarded the Distinguished Service Order, gazetted in February 1915, but he was seriously wounded a few weeks after the engagement. He was promoted to major in March 1916, with effect from August 1915, and served in the War Office in England as GSO Grade 3 in 1916 and 1917. He was mentioned in despatches twice, and awarded the French Croix de Guerre in 1917. He went on half-pay due to illness caused by wounds in July 1917, and retired from the army in 1922. A monument to the action was unveiled in Belgium on 22 August 1939.
Later life
Hornby married Dorothy Henderson in 1914. They had four daughters. He survived the war, and served as a Justice of the Peace from 1924, becoming vice-chairman of the bench of magistrates in Hexham. He served in the rank of captain with the 4th/7th Royal Dragoon Guards in the Royal Armoured Corpsthe Second World War, from February 1941 to April 1943. Hornby died in Hexham in Northumberland, with an obituary published in The Times.