An emotional state where someone is in a bad mood because they have been offended by or taken exception (objected) to some action, usually involving being seen in an inferior light to another person.
I think he got his nose out of joint when they promoted his friend but not him.