In Megillat Esther 2:10 the pasuk tells us that לֹא־הִגִּ֣ידָה אֶסְתֵּ֔ר אֶת־עַמָּ֖הּ וְאֶת־מֽוֹלַדְתָּ֑הּ, Esther didn't tell her nation or birthplace. However, a few pesukim later in 2:20, we learn that אֵ֣ין אֶסְתֵּ֗ר מַגֶּ֤דֶת מֽוֹלַדְתָּהּ֙ וְאֶת־עַמָּ֔הּ, Esther doesn't tell her birthplace or nation. Why is the order reversed the second time?
ארמית: אין ולית אסתר מחויא ית עמא ותולדותא
עברית: אין אתסר מגדת את עמה ומולדתה
Yosef Lekach to 2:11 and 2:19 explains the switch. On verse 2:11 he says originally Mordechai didn't want Achashverosh to choose Esther, and tried very hard to avoid her getting taken. Once she was, Mordechai was terrified Achashverosh would be terribly insulted at these attempts. If he found out her nation, he could wipe them out. And if he found out she came from a prominent family, it might seem that they think they're too good for him, and he could wipe out Mordechai and his relatives. Therefore he commanded her not to reveal her nation or family. He commanded both because if for some reason she can't hide her nation, she should still try to hide her family. This is because Achashverosh would more likely take out his fury on her family than her nation, so it was the more important secret.
However, by verse 2:20 this fear was gone. Esther was firmly established as queen. There was no longer any need to keep this information from Achashverosh. Nevertheless, Esther kept the secret (he says this shows her righteousness and piety, I assume he means she kept her word even when it was no longer necessary). The smaller novelty is she didn't reveal her family, since that had the bigger danger involved. Not only that, but she even didn't reveal her nation, which by this point had a very unlikely chance of being in danger. This is why the verse switches it: She didn't reveal, not only her family, but even her nation.
The Malbim to 2:20 gives a different explanation. Originally Achashverosh wanted to know who she was, and the normal way to find out who a person is to first know their nation, and then their family. However at this point, Achashverosh wanted to benefit her family, so that's what he wanted to know first. He even wanted to do good for her nation, so he asked that afterwards.
edit: I see @jay beat me to the Malbim.
The Malbim asks this question and answers that initially they just wanted to know who she was, and the social norm was to inquire about nationality first when getting to know someone. However later when she was Queen they wanted to know who she was so that they could bestow benefits on her people, and since her family would be the first to receive such benefits, it lists the family first.
אין אסתר מגדת מולדתה ואת עמה, והנה תחלה הקדים עמה למולדתה, כי שם היה המבוקש לדעת מי היא, ודרך לשאול תחלה על עמה ואח''כ על מולדתה ופה היה המבוקש כדי להטיב עם בני עמה, ובזה שאלו תחלה על מולדתה שהם קודמים לקבל הטוב ההיא ואח''כ על עמה שגם עמהם ייטיבו בעבורה
According to the Judaica Press translation
10 Esther did not reveal her nationality or her lineage, for Mordecai had ordered her not to reveal it.
not to reveal: so that they should say that she was from an ignoble family and dismiss her, for if they knew that she was of the family of King Saul, they would detain her.
A second explanation is given at Why Did Esther Hide Her Identity? (see below for details of the second answer.)
The most important part of the attempt was to hide her nationality so that being from an unknown nation, she would be rejected as not being from an important enough nation to be worthy of they king.
The use of the word lineage rather than birthplace is to hide the fact that she was descended from King Saul.
If she revealed the nation, it would have been assumed that she was from an important family (even assuming from Yehudah) as the original exiles to Bavel were the nobility who were exiled with Yechanya (like Mordechai).
In the second case, since the king had accepted that she was from an unknown nation and had honored Mordechai, the lineage was more important. This was especially to hide her relationship to Mordechai.
The Judaica Press Esther says on 2:20
The Gra explains that Esther realized that she was of high esteem in the king's eyes - he had granted all the provinces a release because of her, all the maidens were sent home except her, and Mordechai had been granted a place of honor among the dignitaries at her request even though the king was unaware of their relationship. In spite of all this honor, Esther would not reveal her lineage.
A second explanation is given at Why Did Esther Hide Her Identity?
I would like to suggest another answer, based on a close examination of chapter 2, and in particular the immediate context of the verses originally quoted. We are told:
"Esther did not reveal her nationality and her descent for Mordekhai had commanded her not to tell. And each day Mordekhai would walk about before the court of the women's house to know how Esther was faring and what would be done with her." (2:10-11)
After Esther finds favor and grace in the eyes of the king and is selected to be his new queen, we read:
"Esther would not reveal her descent and her nationality, as Mordekhai had commanded her, and Esther carried out Mordekhai's word as she used to when she was in his custody." (2:20)
In both instances the text attributes Esther's actions to Mordekhai's command, and in both cases the text goes on to describe the behavior of one of them: in the first instance, Mordekhai's behavior ("Each day..."), and in the second instance, Esther's behavior ("And Esther carried out Mordekhai's word..."). Both times the verb used is derived from the root a-s-h (to do): first "what would be done (ye'aseh) with her," and then "Esther carried out ('osah)..."
This teaches us that Mordekhai was animated by two concerns. First, Mordekhai treats Esther like a father who loves his daughter. He is concerned for her well-being and what will become of her, and he is also concerned for her own actions and behavior. It should be noted that at first, before she becomes queen, Mordekhai's primary concern is for her welfare lest she - as a foreign girl - be treated badly. Later, when she takes the place of Vashti as queen, this possibility no longer troubles him and he begins to be concerned about what she herself will do and how she will act.
Therefore, the text at first (when she is taken to the women's house, before becoming queen) describes Mordekhai as walking about before the courtyard of the women's house to know how Esther was faring and what would be done with her. (Note the parallel to the story of Moshe Rabbeinu as a baby, and how his sister Miriam stationed herself nearby to see what would become of him. Both stories involve the captive becoming part of the royalty and eventually saving the Jewish nation.)
Against this backdrop, Mordekhai felt it would be wise for Esther to refrain from revealing her nationality and lineage, his concern for her welfare was bound up with the fact that she was a Jewess, a stranger and foreigner.
As stated, Mordekhai - whose nationalistic Jewish orientation requires no proof - believed that it was proper for him to continue serving as a guide to Esther. For this reason, he thought it better that the family connection between them not become known, in order that Esther's actions for the benefit of her nation could be carried out and would not appear to be serving anything other than the best interests of the kingdom. Although any ruler has advisors, and such was Mordekhai's position in relation to Esther, an advisor appointed in accordance with state considerations and who acts accordingly is not the same as an advisor who acquires his status through family connections. The latter will always be suspected of improper personal interests - and certainly if the person of power and the advisor belong to a foreign nation.