John B. Packer was born in Sunbury, Pennsylvania. He received private instructions and later attended Sunbury Academy in Sunbury, Pennsylvania. He was a member of the corps of engineers employed by the State in the survey and construction of public improvements from 1839 to 1842. He studied law, was admitted to the bar on August 6, 1844, and commenced the practice of his profession in Sunbury. He was also engaged in banking. He served as deputy attorney general from 1845 to 1847. He served in the Pennsylvania State House of Representatives in 1850 and 1851. He was one of the organizers of the Susquehanna Railroad Company in 1851.