 He was the paternal grandson of the 6th United States president, John Quincy Adams (his namesake), and the great-grandson of the 2nd president, John Adams.His maternal grandfather was shipping magnate Peter Chardon Brooks (1767–1849).He graduated from Harvard University in 1853, studied law, attained admission to the bar, and practiced in Boston.