At the start of war of the Rough Wooing, James and his brother David communicated with Henry VIII of England on the possibility of their surrendering Tantallon Castle to the English army that burnt Edinburgh in 1544. However, four years later he defended Dalkeith Palace against the English and was captured in June 1548, "sore hurt on the thigh those times often a euphemism for the male genitalia" and taken as a hostage to England. After the Treaty of Boulogne brought peace, in 1550 James returned from captivity in England and was exchanged for the English soldier John Luttrell, and began to use his title of "Earl of Morton."