Malachi 1:3 ASV

God can both hate and love sinners. His hatred is His love, His love is His hatred. His judgment is HIs mercy, HIs mercy is His judgment. He does this to give us all another chance to redress or repent.

It's not just sin; it's also the unrepentant sinner that God hates. And he hates them so that his wrath might wake them up from their stupor and change their minds and repent. And by doing such, He loves sinners. 

God loved Jacob but hated Esau. Yet, God chose him over Jacob to be Isaac's first born. The first born gets all the blessings. God loved him. But Esau messed up and trashed what precious gift God had given him.

Esau could have repented and loved Jacob. But  this story was followed by centuries of Edom or Esau hating his brother Jacob or Israel, and later getting fierce judgment because of this. 

God loved Jacob--He chose him to test the heart of Esau. Yes, he was not chosen to be the first born, but God used him to reveal Esau's heart. It's an honor to be used by God like that. But of course, Jacob also did some wrong things, but at least, he went back to God to do His will again.