Are the Jews "a nation" by virtue of ethnic origin or by virtue of being chosen by God? (That is, which of these two criteria has lexical priority over the other?) What constitutes the peoplehood of Jews? What are the relevant scriptural sources for these questions?
The Jewish people became a nation ("עם") at Mount Sinai:
See Ibn Ezra, Sforno, Ramban there that this refers to the event of the giving of the Torah.
At Mount Sinai we were chosen by G-d:
That's actually from this week's parsha Yitro.
As you can see by parsing the words of the Torah carefully, first we are recognized as the "House of Israel" or here it's translated as "The family of Israel". We are first and foremost an Ethnic group. Modern DNA research confirms this as well. We are then secondly, a "Kingdom of Priests, and a Holy nation". It is this "Kingdom of Priests" which is promised if we "obey and keep" the mitzvot. However, the keeping of Mitzvot is our main task, along with creating a nation and country which is both Ethnic and Religious in nature. Thus allowing for a full long history of converts into our nation.
So one can say we became a nation because of our shared Ethnicity, but we continue to be a nation because of our relationship with Gd.