Adonijah was the fourth born son of King David by his wife Haggith while David lived in Hebron and had not yet become King of all Israel.
Adonijah hadn't been disciplined during his life and was a handsome man like his half brother Absolom had been. He watched his father David rule for 40 years, and when David was at the point of death, Adonijah made his move to take the throne and become the next ruler, having himself proclaimed as King of Israel with 50 men running ahead of him. He sought and received the support of Joab and Abiathar, a priest. But other men did not agree with what he had done including Nathan the prophet. Nathan spoke to Bathsheba, Solomon's mother, to tell him what was happening and that her son was being squeezed out of the kingship. Nathan told her to see King David and tell him what had happened, and he would come in and confirm what she said. This happened, and David was not pleased. He gave his blessing to having Solomon declared King while he himself was still alive, and those who were loyal to Solomon went with him as he rode David's mule into down the streets. The people rallied around Solomon and Solomon took the seat on the royal throne. When Adonijah and his guests heard this, they realized their quest for the throne had failed and they fled. Adonijah went and grabbed the horns of the altar in the temple, a way to seek asylum from punishment. Solomon allowed him to live and he bowed down to Solomon.
But Adonijah still was not satisfied. He asked Bathsheba to ask Solomon to allow him to marry Abishag, who was David's last wife. When Bathsheba told Solomon, he recognized it as another attempt to grab the throne by connecting himself with David the King. Solomon had him slain.