Mordecai discovered a plot by two of the king’s officers to lay hands on the king and reported it through Esther (Esther 2:21–22). The matter was investigated, the men were hanged, and the event was recorded in the royal chronicles (Esther 2:23).
In Esther 2:21–23, a serious threat against King Ahasuerus emerges from inside the palace staff. Mordecai, positioned at the king’s gate, learns that two gatekeepers are angry and planning to attack the king. He relays the information to Queen Esther, and she reports it to the king while naming Mordecai as her source. This scene comes soon after Esther’s rise to queenship and shows Mordecai still operating near the palace gate, where information and influence flow.
Esther 2:21–23 presents a palace-level crisis and a clear chain of reporting: Mordecai learns of an internal threat to the king, informs Esther, and Esther reports it to the king while naming Mordecai as her source. The court then investigates, confirms the report, executes the conspirators, and records the whole event in the royal chronicles.
A careful answer keeps the immediate passage, the book's argument, and the whole-Bible storyline together, so the question is answered in context instead of as a detached idea.
Start with Esther 2:21-22, then read the surrounding section so the answer stays connected to the passage's flow.
21In those days, while Mordecai was sitting in the king`s gate, two of the king`s chamberlains, Bigthan and Teresh, of those who kept the threshold, were angry, and sought to lay hands on the king Ahasuerus.
22The thing became known to Mordecai, who showed it to Esther the queen; and Esther told the king [of it] in Mordecai`s name.