 O'Neill graduated from the Royal Military College, Duntroon in 1958, and from 1958 to 1969 served as an officer in the Australian Army.His service included a tour of the Vietnam War as an infantry captain with the 5th Battalion, Royal Australian Regiment from 1966 to 1967, during which he was Mentioned in Despatches.In 1965, he completed his Doctor of Philosophy thesis at the University of Oxford on "The Relationship between the German Army and the Nazi Party, 1933–9" under the direction of one of his predecessors as Chichele Professor of the History of War, N. H. Gibbs.