In 1970, Dietz received a senatorial scholarship to study at the University of Pittsburgh School of Medicine, transferring in 1972 to Johns Hopkins University. There, he was among a handful of students in the M.D.-Ph.D. Program in Behavioral Sciences funded by the National Institute of General Medical Sciences and the Grant Foundation of New York. From 1972-1975, while completing medical school and course requirements for a Ph.D. in Social Relations, Dietz also earned a Master of Public Health (MPH) degree. Dietz worked with the school's noted public health professor Susan Baker on a study of drowning cases and their prevention and epidemiology, using the Haddon Matrix paradigm to categorize specific prevention measures for specific injuries. In 2012, Baker wrote that Dietz, "later applied the Matrix to the problem of rape, showing its value in formulating approaches to intentional injury…and the Haddon Matrix probably played a role in his development of an entire industry addressed to workplace violence prevention." After completing his residency in psychiatry at Johns Hopkins in 1978, Dietz began teaching at Harvard Medical School, where at age 29 he was the school's youngest assistant professor. While teaching at Harvard, Dietz also was the director of forensic psychiatry at Bridgewater State Hospital, a facility for the criminally insane in Bridgewater, Massachusetts. After four years at Harvard, Dietz became an associate professor at the University of Virginia in 1982, teaching law, behavioral medicine and psychiatry at the UVA School of Law while also being the medical director at UVA's Institute of Law, Psychiatry and Public Policy. He taught on the Charlottesville campus for six years, and was promoted to Professor of Law in the School of Law and Professor of Behavioral Medicine and Psychiatry in the School of Medicine. John W. Hinckley, Jr. attempted to assassinate President Reagan outside Washington, D.C.'s Hilton Hotel on March 30, 1981, and Hinckley's 1982 trial included Dietz as an expert prosecution witness (while he still was teaching at Harvard). In his five days of testimony, Dietz told the jury that Hinckley told him that he felt shooting the president accomplished his goal of trying to impress actress Jodie Foster. Dietz quoted Hinckley as saying, " 'Actually, I should feel good because I accomplished everything on a grand scale… I did it for her (Foster's) sake…' "  Assistant U.S. Attorney Roger Adelman, the chief prosecutor, argued that Hinckley may have been emotionally unstable at the time of the shooting, but that he was not so mentally disturbed that he could not understand what he did when he shot Reagan.