He was born in Halifax, Nova Scotia, the eldest surviving son of Captain John Willshire by Mary, daughter of William Linden of Dublin. His father, a soldier himself, purchased Thomas' Army commission in the 38th Foot when he was only 6 years old. He joined the regiment in the West Indies in 1798, returned with it to England and attended schools in King's Lynn and Kensington. He was promoted captain in 1804, joined the regiment in South America and took part in the attack on Buenos Aires. He then went with the regiment to Portugal in 1808, where he fought at Roliça, Vimiero, and Coruña. In 1809 he served in the Walcheren Campaign, where his father died.