On 12 July 1808 Robe sailed for Portugal, in command of the artillery of Arthur Wellesley's expedition. He was present at the Battle of Roliça on 17 August and the Battle of Vimeiro on 21 August, and was mentioned in despatches. At Vimeiro he used shrapnel shell for the first time, and was so pleased with its effect that he applied for large supplies of it. On the evacuation of Lisbon by the French, Robe took possession of the ordnance in the citadel. When Sir John Moore's army left for Spain, Robe remained in command of the artillery at Lisbon, under Sir Harry Burrard and John Craddock, until the arrival of Brigadier-General Howarth in April 1809. On Wellesley's return from England to take command of the British forces in the Peninsula in April 1809, Robe was in charge of the artillery reserves. He took part in the advance against Marshal Soult to the Tras os Montes, and the capture of Porto in May. He was in the advance into Spain against Joseph Buonaparte, the Battle of Talavera on 27 July 1809, and in the subsequent retreat over the Mesa d'Ibor to Truxillo, and thence to Badajos. In 1810 he was appointed to the command of the Royal Artillery driver corps, and he took part in the retreat to the Lines of Torres Vedras, including the Battle of Bussaco on 28 September.