He was born near Red Bank (now Saluda), South Carolina, a son of James and Sophia (Smith)(Sophia was his father's second wife) Bonham, who had moved to South Carolina from Maryland shortly after the American Revolution. Bonham was a second cousin to Alamo commander William B. Travis and their families attended the same church in South Carolina. He was a first cousin once removed to Andrew Pickens Butler.
Bonham entered South Carolina College in 1824. In 1827, in his senior year, he led a student protest over harsh attendance regulations and the poor food served at the college boardinghouse. He was expelled, along with the entire senior class. In 1830, Bonham practiced law in Pendleton, but was found in contempt of court after caning an attorney who had insulted one of Bonham's clients. When ordered to apologize by the sitting judge, he refused and threatened to tweak the judge’s nose. Bonham was sentenced to ninety days for contempt of court.