 Baptised John Townshend on 26 December 1823 at St. George's, Bloomsbury, he was the eldest surviving son of the brewer John Margetts and the heiress Sarah (née Dunn Gardner), estranged wife of George Townshend, 3rd Marquess Townshend.All the children of this union were declared illegitimate by a private Act of Parliament in 1843.Dunn Gardner, who had styled himself "Earl of Leicester" (the courtesy title used by the heir apparent to the marquessate of Townshend) before his election to parliament, then assumed his mother's maiden name of Dunn Gardner.