The electoral college was created as a compromise between those at the Constitutional Convention who wanted the U.S. president elected by popular vote and those who wanted Congress to select the president. Instead, electors corresponding to the number of representatives each state had in Congress would elect the president.
Objections to a popular vote mainly concerned the difficulty of transmission of information about the candidates to voters throughout the country, which would lead voters in larger states to prefer local politicians with which they were familiar. Voting by Congress alone would potentially upset the governmental balance of power and lead to corruption and political bargaining. A group called the Committee of Eleven proposed the compromise of the Electoral College. Each state would have a total number of electors corresponding to its two senators and the amount of its members in the House of Representatives, which is based on the state's population. Individual state legislatures would decide on how the electors were chosen, assuaging the fear of many states of a too-powerful federal government. To maintain balance in the various branches of the federal government, members of Congress and government employees were not allowed to be electors. The electors would meet in their home states, further forestalling federal intervention.
The Constitutional Convention agreed upon the compromise, and the Electoral College system was written into Article II, Section 1 of the Constitution.