This rhyme called Grand old Duke of York came from the brief invasion of Flanders by Frederick Augustus, Duke of York—the second son of King George III— and Commander-in-Chief of the British army during the Napoleonic Wars.

In 1793 a painstakingly-prepared attack on the northern conquests of the French Republic was led by the Duke himself. He won a small cavalry victory at Beaumont (April 1794) only to be heavily defeated at Turcoing in May 1794 and recalled to England (hence "He marched them up to the top of a hill, and he marched them down again") The 'Grand Old Duke' was appointed Field Marshal in 1795 and Commander in Chief in 1798. Despite a disastrous attack on the Dutch island of Walcheren (1799) and allegations in 1809 that his mistress Mary Anne Clarke used her influence to buy officer commissions, Frederick Augustus returned to his command in 1811 and played a great part as a backscene administrator in organising Wellington's victories in the Peninsular War. He became heir to the throne in 1820, but predeceased his elder brother George IV in 1827.