Shaw Kennedy was the son of Captain John Shaw, a former captain in the 76th Highlanders, of Dalton, Kirkcudbrightshire. He was educated at Ayr Academy. He was commissioned into the 43rd (Monmouthshire) Light Infantry in 1805 joining the regiment at Hythe, Kent where it was training under Sir John Moore. He first saw service in the Copenhagen Expedition of 1807 as a lieutenant, and under Sir David Baird took part in the Corunna Campaign. In the retreat from Corunna, led by Sir John Moore, Shaw and the 43rd fought with the rearguard to the army. On his return to England he suffered from a severe fever from which he never fully recovered. In May 1809, Shaw returned to the Peninsula with the 43rd and took part in the 250-mile march from Lisbon to Talavera where he became adjutant of his now famous regiment at the Battle of Talavera.