Sometimes getting assassinated does wonders for your career as a president. For example, look at JFK who although he's fondly remembered, was a much more divisive leader than people today realize.
Sometimes, getting killed in office just makes people forget you. This is unfortunately the case with Garfield who was really neither loved or hated and went from president into a historical foot note after he was assassinated 100 days into his term.
Garfield's legacy can be considered civil service reform, which he supported and Chester Arthur (his Vice President) enacted.
The very idea that he'd be remembered as a man who would reduce the role of 'spoils' politics is ironic. Garfield was elected only with the support of Senator Roscoe Conkling who mobilized the political machine he informally ran in New York to vote for Garfield. Without the support of the very machine that Garfield's reform sought to reduce, Garfield would have lost the election.
The fact that Arthur pushed Garfield's desired reform after he assumed the presidency is even more ironic. Arthur made his career in Manhattan as a loyal party man, coming up through the ranks of Conkling's machine.
I can think of a couple presidents that would have been much more fondly remembered if they had been killed early on in their terms, but we'll never know which category Garfield would have fit into.