MacVeagh served as the 36th Attorney General in 1881 under President James A. Garfield. He resigned after President Garfield's assassination. Chester Arthur was to be 21st President and MacVeagh served as a cabinet member.