Hawker served with the 14th Light Dragoons under the Duke of Wellington during the Peninsular War. He led his squadron in the Battle of Douro (6 May 1809), his regiment thereby earning the battle honour "Douro" for its colours. He received a serious thigh wound in the following Battle of Talavera (28 July 1809), was declared unfit, and so resigned and sold his commission. In recognition of his service, Hawker was awarded a modest annual pension of £100. Despite his injuries and consequent ill health, he was later able in 1815 to accept an active commission as major of the North Hampshire Militia; he was recommended for the post by the then Duke of Clarence, heir to the throne and future King William IV. Hawker was made a lieutenant-colonel of the militia in 1821 and ultimately became deputy lieutenant for his county.