Dean Jens explicates the original purpose of the Electoral College:
[T]he electoral college as originally conceived was expected to elect George Washington as many times as he could be talked into it, and then to very rarely actually give a majority of the votes to any candidate. It was viewed largely as a nominating committee, giving the House of Representatives a short list of candidates from which to select a president. It didn’t work out the way they envisioned, and, if it had, it may not have worked out the way they envisioned; regularly having the legislative branch elect the chief executive may or may not have proved to be a good idea. But it’s my understanding that that was the idea.
Alexander Hamilton’s explanation of the selected procedure is in Federalist 68. Funnily enough, one of the changes to the procedure made in the 12th Amendment reduced the “short list” of candidates from an indecisive vote of the Electoral College from five to three.