Dunbar was born in Dayton, Ohio to parents who had escaped from slavery; his father was a veteran of the American Civil War, having served in the 55th Massachusetts Infantry Regiment and the 5th Massachusetts Colored Cavalry Regiment. His parents instilled in him a love of learning and history. He was a student at an all-white high school, Dayton Central High School, and he participated actively as a student. During high school, he was both the editor of the school newspaper and class president, as well as the president of the school literary society. Dunbar had also started the first African-American newsletter in Dayton.