Maybe you mean Q. 2:178 and its commentary?
O believers, prescribed for you is retaliation, touching the slain; freeman for freeman, slave for slave, female for female. But if aught is pardoned a man by his brother, let the pursuing be honourable, and let the payment be with kindliness. That is a lightening granted you by your Lord, and a mercy; and for him who commits aggression after that -- for him there awaits a painful chastisement.
Jalalayn:
The Sunna makes it clear that a male may be killed [in retaliation] for a female, and that religious affiliation should be taken into account also, so that a Muslim cannot be killed in return for a disbeliever, even if the former be a slave and the latter a free man.
The Tafsir is closer to what I remember reading, but I wasn't reading any Tafsirs at the time so I suspect there is something very similar in the Quran itself saying that you cannot kill a believer for the sake of a disbeliever.