The following phrase "to the victor belong the spoils" was initially popularized in New York, NY by Senator William L. Marcy. He applied the words when he was referring to the victory of Andrew Jackson in the election of 1828. The term spoils had been used to refer to any goods or benefits taken from the loser in a competition, election, or military victory. During the election of President Jackson, the above saying accurately described the spoils system of appointing government workers. Each time a new administration came into power thousands of public servants were discharged and members of the victorious political party took over their jobs.

Senator Marcy's remark was largely in defense of Andrew Jackson and Jackson's campaign against President John Quincy Adams in 1828. In part, Jackson's run for the presidency was seen as a vendetta against Adams, whose conduct and remarks when taking office seemed to justify the association of Jackson with the spoils system that had sullied the reputation of many U.S. politicians. Adams was seen as the last of the non-partisan or bipartisan breed of politicians that characterized U.S. politics during the "Founding Fathers" era. One story is that on the day of President Jackson's inauguration or shortly after the White House was so besieged by job seekers that they were climbing in and out of windows to the White House.

More Info: en.wikipedia.org