He was born in Peru, Nebraska. Pettit received his bachelor's degree from the Nebraska State Normal School in Peru. He taught astronomy at Washburn College in Topeka, Kansas from 1914 to 1918. He married Hannah Steele Pettit, who was an assistant at Yerkes Observatory, and received his Ph.D. from the University of Chicago in 1920.
Shortly after he became a staff member at Mount Wilson Observatory. He initially specialized in solar astronomy and built his own thermocouples. He also made visual observations of Mars and Jupiter. Even after his retirement he continued to make spectrographs for various observatories in the machine shop in his home.