Reb Mordechai;
The gemmora In Meggila (12b?) says that When Mordechai is called ISH
YEHUDI It is because Klall Yisroel was commenting (Either for the good or
the bad) That because Dovid did not kill Shimmi Ben Gerah, this caused
Mordechai to be born.
I had assumed that meant that Mordechais was a descendant of Shimmi ben Gera. However the gemora (13b) says that Mordechai and Esther descended
from King Shaul, Who was a contemporary of Shimmi's.I did some further checking (Specifically in the preface to Megillah in the SIFSAY CHACHOMIM. In fact he makes a note on 12B to look at his
preface on Mordechai, but I saw nothing that referred to Shiimi Ben Gera. ) And nowhere is Shimmi ben Gera mentioned in Mordechai's Lineage.So now I return to the earlier Gemmorah and ask, How was NOT killing
Shimmi a cause for Mordechai to be born? (Was Mordechai's Paternal
grandmother from Shimmi? We know it was not his mother because SHE was
from Shevet Yehuda!)
Yeyasher chaylech leorayso
Yosey
The Gemara expounds the verse, "Mordechai the son of Ya'ir the son of Shim'i " (Esther 5:2) as referring to Shim'i ben Gera. (We strongly recommend looking in the Targum Sheni on this verse, who details Mordechai's lineage.)
Regarding your question, how could Mordechai have been a direct descendant (Ben Achar Ben) of Shim'i ben Gera, if Shim'i did not come from Shaul and the Gemara says that Esther was a direct descendant of Shaul and Mordechai was her cousin (her father's brother's son), my brother RAV ELIMELECH KORNFELD, shlit'a, gave the following answer:
Esther's father and Mordechai's father were brothers from their mother only, but not from the father. (That is, Mordechai's father's mother remarried and from that second marriage, bore the father of Esther.) Thus, Mordechai was indeed a direct descendant of Shim'i, as Mordechai's father's father was descended from Shim'i! (Shim'i himself was from the grandchildren of Kish, the father of Shaul, and we find that this verse in Esther lists "Kish" in the lineage of Mordechai. Esther's father was from the descendants of Shaul.)
Be well,
Mordecai