I Kings 1:6 tells us that David had always given Adonijah whatever he wanted. So, (as Absalom's younger brother) he evidently felt like the throne was rightfully his, since he was "next in line" behind his deceased brother. So, rather than waiting for his Dad to die, Adonijah took Joab the general and Abiathar the priest and declared the commencement of his own reign.
When Nathan the prophet realized what was going on, he sent Bathsheba to David and followed her into the king's chamber to help persuade him that the threat was real. They knew that David (and God) had selected Solomon to be his replacement, but David was in a weak position... old, bedridden, feeble... so, they stepped in to prevent what they perceived to be an impending disaster.
Adonijah obviously knew who NOT to let in on his conspiracy. Nsterathan, Zadok, Benaiah and Solomon weren't invited to the coronation. That by itself indicates that Adonijah knew very well that he was out of line. But, he didn't have long to wonder whether his plan would work or not. As Adonijah's coronation meal was ending, so was his brief reign (I Kings 1:41}. When word came that Solomon was crowned legitimately, Adonijah's followers quickly left him to fend for himself (I Kings 1:49}. Wisely, or perhaps because there was no other option, Adonijah humbled himself before Solomon and surrendered to his majesty. So, Solomon spared his life... for the time being.