There is a really important connection between loving your neighbor as yourself (vs 8) and living in the mercy-based law of liberty (vs 12-13 - i.e. loving gospel mercy). The story of Jonah illustrates this wonderfully. Jonah did not love mercy, though it may have seemed he did when he happily received it for himself. But his anger over God's mercy toward Nineveh revealed that he did not in fact love mercy, he simply loved himself. Those with true faith (i.e. "those who love [God]" vs 5) are those who love God's mercy, and thus love it for others as well. See my dot notes below for other insights and take-aways. For a full run-through of building this arc, see the three video entries in Learning Resources (requires the Learning Resources add-on).
Main point summary
Brothers, do not become evil judges by showing partiality, but rather hold tight to the mercy-based law of liberty (i.e. the gospel) in Jesus.
Ἀδελφοί μου, μὴ ἐν προσωπολημψίαις ἔχετε τὴν πίστιν τοῦ κυρίου ἡμῶν Ἰησοῦ Χριστοῦ τῆς δόξης.
My brothers, show no without partiality as you hold the faith in our Lord Jesus Christ, [the Lord] of glory.
ἐὰν γὰρ εἰσέλθῃ εἰς συναγωγὴν ὑμῶν ἀνὴρ χρυσοδακτύλιος ἐν ἐσθῆτι λαμπρᾷ,
For if a man wearing a gold ring and fine clothing comes into your assembly (synagogue),
εἰσέλθῃ δὲ καὶ πτωχὸς ἐν ῥυπαρᾷ ἐσθῆτι,
and a poor man in shabby clothing also comes in,
ἐπιβλέψητε δὲ ἐπὶ τὸν φοροῦντα τὴν ἐσθῆτα τὴν λαμπρὰν
and if you pay attention to the one who wears the fine clothing
καὶ εἴπητε• σὺ κάθου ὧδε καλῶς,
and say, “You sit here in a good place,”
καὶ τῷ πτωχῷ εἴπητε•
while you say to the poor man,
“You stand [over there],”
ἢ κάθου ἐκεῖ ὑπὸ τὸ ὑποπόδιόν μου,
or, “Sit down there at my feet,”
καὶ οὐ διεκρίθητε ἐν ἑαυτοῖς
have you not then made distinctions among yourselves
καὶ ἐγένεσθε κριταὶ διαλογισμῶν πονηρῶν;
and become judges with evil thoughts ( or [utilizing] evil calculations)?
Ἀκούσατε, ἀδελφοί μου ἀγαπητοί•
Listen, my beloved brothers,
οὐχ ὁ θεὸς ἐξελέξατο τοὺς πτωχοὺς τῷ κόσμῳ πλουσίους ἐν πίστει καὶ κληρονόμους τῆς βασιλείας
has not God chosen those who are poor in the world [to be] rich in faith and heirs of the kingdom,
ἧς ἐπηγγείλατο τοῖς ἀγαπῶσιν αὐτόν;
which he has promised to those who love him?
ὑμεῖς δὲ ἠτιμάσατε τὸν πτωχόν.
But you have dishonored the poor man.
οὐχ οἱ πλούσιοι καταδυναστεύουσιν ὑμῶν
Are not the rich the ones who oppress you,
καὶ αὐτοὶ ἕλκουσιν ὑμᾶς εἰς κριτήρια;
and the ones who drag you into court?
οὐκ αὐτοὶ βλασφημοῦσιν τὸ καλὸν ὄνομα τὸ ἐπικληθὲν ἐφʼ ὑμᾶς;
Are they not the ones who blaspheme the honorable name by which you were called?
Εἰ μέντοι νόμον τελεῖτε βασιλικὸν
If you however really fulfill the royal law
κατὰ τὴν γραφήν• ἀγαπήσεις τὸν πλησίον σου ὡς σεαυτόν,
according to the Scripture, “You shall love your neighbor as yourself,”
you are doing well.
εἰ δὲ προσωπολημπτεῖτε,
But if you show partiality,
you are committing sin
ἐλεγχόμενοι ὑπὸ τοῦ νόμου ὡς παραβάται.
and are convicted by the law as transgressors.
ὅστις γὰρ ὅλον τὸν νόμον τηρήσῃ
For whoever keeps the whole law
πταίσῃ δὲ ἐν ἑνί,
but fails in one point
γέγονεν πάντων ἔνοχος.
has become accountable for all of it.
ὁ γὰρ εἰπών• μὴ μοιχεύσῃς,
For he who said, “Do not commit adultery,”
εἶπεν καί• μὴ φονεύσῃς•
also said, “Do not murder.”
εἰ δὲ οὐ μοιχεύεις
If you do not commit adultery
but do murder,
γέγονας παραβάτης νόμου.
you have become a transgressor of the law.
καὶ οὕτως ποιεῖτε
and so act
ὡς διὰ νόμου ἐλευθερίας μέλλοντες κρίνεσθαι.
as those who are to be judged under the law of liberty.
ἡ γὰρ κρίσις ἀνέλεος τῷ μὴ ποιήσαντι ἔλεος•
For judgment is without mercy to one who has shown no mercy.
κατακαυχᾶται ἔλεος κρίσεως.
Mercy triumphs ( lit. exults) over judgment.
There is irony in 6b-c. The rich oppress you "normally" as well as through the system (i.e. the courts) that are meant to guard against oppresion.
General observation: the scriptures do not just state the truth, but reason for it. This is very clear here.
God chose many from a certain kind of person (i.e. poor) to be rich in faith. (Note it does not say that God chose a person because he foresaw his rich faith. One could argue from here that God's election is based on foreknowledge in a certain way, but it is not foreknowledge of a person's faith--it is foreknowledge of their poverty! For God delights to lavish riches on those without, and faith is a gift to his chosen not the bases of his choosing. See also 1Cor 1:26-29. )
There is one law because there is one law-giver. God is not giving a test where 60% or higher is passing. He has given a law where any breaking of that law is sin (9b) against God (11a), punishable by the death of your soul (1:15, 5:20).
There is a really important connection between loving your neighbor as yourself and living in the mercy-based law of liberty (i.e. loving gospel mercy). Jonah did not love mercy, though it may have seemed he did when he happily received it for himself. But his anger over God's mercy on Nineveh revealed that he did not really love mercy, he simply loved himself. True faith (i.e. "those who love [God]") are those who love God's mercy, and thus love it for others too.
A-B-A structure in 2-11. There are only two alternatives presented, with one of those alternatives presented twice (5-7, 9-11)
vs12 is another way of saying "hold the faith in our Lord of glory Jesus Christ." (vs 1)
Clearly the problem is not distinctions in every way, but making distinctions based on external realities, not the heart.
"become judges [utilizing] evil calculations" = deeming some types external distinction as making a person worthy of honor.
"God chose" + "those who love him" -- So often the scriptures put sovereign election along side the real, required human response. This is good for us. We must receive both!
Why royal? Because it's a law that belongs to a King, not a republic. In a republic or democracy, the law is impersonal. In a monarchy, it is a personal offense against the king.
The one who shows partiality (and has not received the "law of liberty") will stand next to the murderer and adulterer on judgment day and likewise pay in eternal punishment. (There are no misdemeanors in the court of the King of Kings.)
Interesting that James, who argues so strongly for the necessity of works to authenticate your faith, has nonetheless chosen to call the gospel "the law of freedom." (Also in 1:25.) That same word "freedom" is used so powerfully by Paul in Galatians to declare that we are not under the Mosaic law.