Background
Barham was the third son of Joseph Foster of Jamaica, who in 1750 took the name of Barham by authority of a private act of parliament, and in accordance with the will of Henry Barham. He was born in Bedford, 8 October 1766, and educated at Saint John"s College, Cambridge, where he matriculated in 1784 but did not graduate.