It was pride. Before man was seen as the apple of God's eye, Satan was the highest angel and second only to God(Father, Son, and Holy Ghost). He probably saw God's affection for man and got jealous like children do when they see their parents paying more attention to another and whatnot.
How...