Unfortunately for McCain, he chose to run for president after 8 years of Bush.  We were in 2 wars that looked to be incompetently put together with no clear path out.  We were on the verge of a massive recession as well.  And many of the ideas and proposals McCain was supporting, were suggesting much more of the same as it had been.  He also chose one of the most odd ball choices for a VP - a no name governor from Alaska who gave us such great catch phrases like "gotcha questions", which she used to describe impossible to answer questions like "What newspapers do you read?"

Aside from picking Palin, the other big ding against McCain was his age - there was much more fear in McCain dying while in office and having Palin take over than what McCain would do in office while he was alive.

He ran that Presidental campaign on being a maverick and not always doing what everyone else in the GOP did.  It only took about 9 years to see that occur on live TV.