Beatty became a doctor and opened his first practice in Hartsville, Pennsylvania. He rose to the rank of major in the 6th Pennsylvania Regiment of the Continental Army during the American Revolutionary War. He was captured at the surrender of Fort Washington on November 16, 1776. After his exchange, he was appointed Commissary General for Prisoners with the rank of colonel.