In season 1 of Game of Thrones, Lord Baelish sets up Lord Stark when he helps set up the fake coup. After watching season 1 and most of season 2, I still don't understand why Lord Baelish did this. What was his reasoning for setting up Eddard Stark instead of helping him protect the throne?
Petyr Baelish wants one thing: power. He is the son of a very minor lord with very poor holdings. He grew up seeing the love of his life get married to someone else with a more powerful family name. He knows that he can never actually rule in name, but he wants to be at least the real power behind the throne. For that to happen he needs to setup a puppet king that he can control.
So Lord Baelish's plan was to back Joffrey's claim to the throne and isolate him from his mother (and the Lannisters) with Lord Stark serving as Joffrey's regent since he is under-aged. In return for this he expected to become Lord Stark's right hand man, giving him a great amount of power especially given Stark's limited political skills.
But Lord Stark had other ideas. He wanted to expose Joffrey's parentage and install Stannis Baratheon and the new king of Westeros. Lord Baelish knew Stannis very well from serving with him in the Small Council. Stannis is a humorless man who had no patience for his scheming and was someone he could not easily manipulate, thus costing him a great amount of power and influence. This was, to him, unacceptable.
So Lord Baelish sided with the Lannisters and helped them foil Stark's plan. Now he has the trust of the Lannisters with all the influence that gives him. The Lannisters are nothing if not generous to those loyal to them, and through further services to the Lannisters he is awarded with the lordship of Harrenhal.
Littlefinger cares about Littlefinger and absolutely nothing else. There is a conversation he has with Ned Stark about their plan. Ned insists on bringing in Robert's brother once Joffrey is dethroned. Littlefinger points out that the new king would probably replace everyone at court but Ned does not care.
This is where Littlefinger tipped the other way.
If he had supported Ned he would have done himself out of a very nice job with little chance of progression.
Baelish betrays Stark because Eddard was going to go against his wishes to have Joffery be the successor. While as insane a plan as it seemed, it was Littlefinger's best chance to retain what power he had as Head of Coin.
Should Joffery be proven to be an illegitimate child and not heir to the throne, Littlefinger has a high chance that he'd lose his position and could not allow Eddard, the man of honour, take that away from him.
This resulted in turning the City Guard against Ned, instead of in his favour.
Good answers so far, I wanted to add another factor that may have contributed to Littlefinger's (Baelish's) betrayal of Ned Stark.
It is revealed later that Littlefinger has been in love with Catelyn since they were kids. So, when Catelyn married Ned Stark, rather than Baelish, this instilled in him a powerful jealousy of Ned Stark. Littlefinger even attempts to pursue her romantically after Ned's death! (Talk about awkward!)
All these responses are valid, but in Season 5 there is a huge reveal that is another reason Baelish betrayed Ned Stark. Stop reading now if you don't want a spoiler:
After Baelish marries Lysa Arryn and becomes defacto Lord of the Vale (thanks to Cersei), it is revealed that Baelish has been involved with Lysa since the beginning and they poisoned her husband (Lord Arryn, Hand of the King) together. Lysa also reveals that Baelish is the one who convinced her to send Catelyn Stark the secret message fingering the Lannisters for his death. Lord Arryn's is the event that sends King Robert Baratheon to Winterfell to ask Ned to be his Hand, thus kicking off all subsequent events in the Game of Thrones.
Further reasons that impressed me when reading:
King Stannis would also have not forgotten being cruelly besieged at Storm's End by Mace Tyrell or the rebellion of the Iron Islands. King Robert forgave both these things, perhaps too easily, for peace. But Stannis is all justice, not mercy. He does not forgive the treachery of the Iron born; he wants to behead Balon Greyjoy for treason. Plus, his wife's family (House Florent) are dynastic rivals to the Tyrells, which would increase the chance of him getting revenge on them. Further, having been satisfied that the royal children were incestuous, that would mean certain conflict with the powerful Lannisters, who would seek to rally the realm to their cause.
Plus, there were a few throw-away lines indicating that Stannis would enact puritanical reforms, such as outlawing prostitution. That would not only hurt trade and potentially foment unrest, but it would directly harm Baelish's financial/intelligence-gathering interests.
Furthermore, Baelish most likely has wind of Renly Baratheon's unwillingness to serve under his brother. Renly is charismatic, with many loyal followers and he holds the vast bulk of Baratheon power from Storm's End - so even setting aside the line of succession, most men of the Storm Lands are unwilling to follow Stannis, their rightful Lord after Robert's death. How could he keep the kingdoms united if he can't unite his own lands?
So a friendless King Stannis, however rightful an heir and righteous in his cause, would bring certain civil war, social unrest and unquestionable harm to Baelish's interests. The choice was easy for him; little did he know that Ned Stark's pardon and release would be bungled...
Littlefinger wanted power. Ned holds the north. It is impossible to take the north while Ned is at Winterfell. He killed Jon Arryn with the help of Lysa so that he hoped King Robert would reach out for Ned to serve as Hand of the King. That way Ned is out of Winterfell and also at Kings Landing where it is easier for him to get rid of Ned with his schemes. He cleverly bought Ned's confidence and betrayed him when the time is right. Now he turned the Lannisters against the Boltons and in return he wanted to become the Warden of the North. If anyone in the game of thrones is more dangerous it is Littlefinger.
No matter how many times I replay this series from the very beginning, there is always something I missed first time round which explains subsequent events. For what its worth, I think jealousy is the primary motive for Baelish betraying Stark - and the l-o-n-g memory of a love lost to a better man. I think the political schemes are all bound up in the jealousy thing.
Being the Master of Coin, Littlefinger knew the financial position of the kingdom. He knew that without the money of the Lannisters it would be difficult to run the kingdom. Had he assisted Ned Stark in stopping Joffrey from becoming king, he would have made himself an enemy of the Lannisters (apparently stronger than the Starks both militarily and financially). So that's the main reason which, coupled with other personal reasons, made him betray Ned Stark.