Wilby was commissioned as an ensign in the British Army on 27 May 1836. He saw action in the Crimean War and commanded the right wing of his regiment at Gujarat and Sindh during the Indian Rebellion in 1857. He was present at the Battle of Aroghee and at the Battle of Magdala in April 1868 during the British Expedition to Abyssinia and went on to be General Officer Commanding, Ceylon from 1879 to 1882. He afterwards served as colonel of the King's Own (Royal Lancaster Regiment) (1892–93).