On the morning of July 2, 1881, Garfield was on his way to Williams College, his alma mater, where he was scheduled to give a speech. Garfield was accompanied by two members of his cabinet, Secretary of State James G. Blaine and Secretary of War Robert Todd Lincoln, as well as his two sons, James and Harry. As he was walking through the Sixth Street Station of the Baltimore and Potomac Railroad in Washington at 9:30 a.m., Garfield was shot twice from behind, once across the arm and once in the back.
His assassin, Charles J. Guiteau, was the poster boy of disgruntled office-seekers. Guiteau had deluded himself to believe that he was on close terms with Garfield even though the two had never spoken to each other. Guiteau also believed he was entitled to a Federal appointment as the United States consul in Paris, a position for which he had no qualifications. Guiteau also believed that a short speech he had made to a small group of people during the presidential election campaign was the cause of Garfield's election to the presidency, which therefore justified his appointment. When the appointment did not materialize, Guiteau believed he could save the nation if Garfield was killed.
Guiteau stalked Garfield for weeks, armed with a .44 caliber Webley Bulldog revolver. As Guiteau was being arrested after the shooting, he repeatedly said, "I am a Stalwart of the Stalwarts! I did it and I want to be arrested! Arthur is President now!" This very briefly led to unfounded suspicions that Vice-President Chester Alan Arthur or his supporters had put Guiteau up to the crime.
One bullet grazed Garfield's arm. The second bullet was thought later to have lodged near his liver but could not be found. When his autopsy was done, the bullet was found behind the pancreas. Alexander Graham Bell specifically devised a metal detector to find the bullet, but the device's signal was thought to be distorted by the metal bed springs.Later the detector was proved to work perfectly and would have found the bullet had Dr. Doctor Willard Bliss (yes, he was a Doctor of Medicine whose given name was also "Doctor") allowed Bell to use the device on Garfield's left side as well.
Garfield became increasingly ill over a period of several weeks due to infection, which caused his heart to weaken. He remained bedridden in the White House with fever and extreme pain. As the heat of summer became more oppressive for the stricken President, a Navy engineer installed what may have been the world's first air conditioner, in Garfield's bedroom. An air blower was installed over a chest containing 6 tons of ice, with the air then dried by conduction through a long iron box filled with cotton screens, and connected to the room's heat vent. This device was at times capable of reducing the air temperature to 20°F (11°C) below the outside temperature.
On September 6th Garfield was moved to the Jersey Shore in the hope that the fresh air and quiet there might aid his recovery. In a matter of hours, local residents put down a special rail spur for Garfield's train. Some of the ties are now part of the Garfield Tea House.
On Monday, September 19, 1881, at 10:20 p.m. President James Garfield suffered a massive heart attack and a ruptured splenic artery aneurysm, following blood poisoning and bronchial pneumonia. Garfield was pronounced dead at 10:35 p.m. by Dr. Bliss in the Elberon section of Long Branch, New Jersey. Mrs. Garfield remained with her dead husband for over an hour until prompted to leave the room. The wounded President died exactly two months before his 50th birthday. His final words were "My work is done."
Guiteau was formally indicted on October 14, 1881, for the murder of the President. Guiteau's counsel argued the insanity defense, but the jury found him guilty on January 5, 1882, and he was sentenced to death. Guiteau was executed on June 30, 1882.
An outstanding book about Garfield's assassination is Candice Millard's 2011 work Destiny of the Republic: A Tale of Madness, Medicine and the Murder of a President, a review of which was posted in this community here. PBS has produced an excellent documentary about Garfield called Murder of a President.