This question already has an answer here:
When Esther was chosen by the Persian king her uncle Mordechai told her to keep her identity a secret, which she did:
Esther had not yet made known her kindred nor her people; as Mordecai had charged her; for Esther did the commandment of Mordecai, like as when she was brought up with him. (Esther 2:20)
When Mordechai refused to bow down to Haman he explained why:
Now it came to pass, when they spoke daily unto him, and he hearkened not unto them, that they told Haman, to see whether Mordecai's words would stand; for he had told them that he was a Jew. Esther 3:4)
Because of this insult Haman persuades the king to issue a decree against the Jews, Mordechai's people. So at this point Haman and the king know that Mordechai is a Jew.
Mordechai then spends a while hanging around the city gate communicating with Esther and urging her to plead for her people.
But later, when Esther pleads directly for her people, the fact that Haman's decree would have targeted Esther seems to come as a surprise to Achashverosh.
If the court functionaries knew that Mordechai and Esther were related then it would seem that the secret would already be blown. But if they didn't know there was a connection, wouldn't the communication between Esther and Mordechai arouse suspicion?
Did they know they were related but they kept the secret from the king, or did they not know?