Context of this hadith?
A Muslim is not to be killed for the murder of a non-Muslim. [Al-Bukhari]
There is difference of opinion on the interpretation of this hadith, and hence there are different rulings on this issue among the madhabs.
The view of the Hanafis is that a Muslim is to be killed in Qisas for killing a Dhimmi. They have presented as evidence the verses of the Quran such as:
وكتبنا عليهم فيها أن النفس بالنفس
And We ordained for them therein a life for a life
ومن قتل مظلوما فقد جعلنا لوليه سلطانا فلا يسرف في القتل
And whoever is killed unjustly - We have given his heir authority, but let him not exceed limits in [the matter of] taking life.
Their argument is that Allah has not differentiated between the types of life for Qisas, whether they be Muslim or Dhimmi etc. So the general rule is that everyone can be killed in Qisas for killing anyone else.
And they have claimed that an exclusion of Dhimmis from the general rule is not clearly evident from any other text in the Quran or Ahadith.
Their explanation for the hadith (whose variant you have quoted):
لا يقتل مؤمن بكافر ولا ذو عهد في عهده
No believer may be killed in return for a disbeliever, nor one with a covenant while his covenant is in effect.
is that a Kafir here means a Harbi and not a Dhimmi. And hence they interpret it as meaning the following:
A believer can not be killed for killing a Harbi disbeliever, nor can a Dhimmi be killed for killing a Harbi disbeliever
They have also cited the following hadith as supporting evidence:
قتل رسول الله صلى الله عليه وسلم رجلا من أهل القبلة برجل من أهل الذمة وقال: أنا أحق من أوفى بذمته
The Messenger of Allah ﷺ executed a Muslim for the murder of a Dhimmi and he said: "I have more right to fulfill my covenant of protection"
And they have cited the athar reporting that Umar ibn al-Khatab, Ali ibn Abi Talib , Abdullah ibn Masud and Umar ibn Abdul Aziz gave judgements for Qisas from a Muslim for killing a Dhimmi. See the remainder of the chapter in Musannaf Ibn Abi Shaybah. Note that most of these reports are weak individually but have been taken as supporting evidence.
The majority view is that a Muslim is not killed in Qisas for the murder of a Dhimmi. Rather he will pay Diyya (blood-money) and may be given a Tazir (discretionary punishment such as imprisonment).
Their evidence is:
The hadith which you have quoted, which they have interpreted on its apparent meaning, as inclusive of both Dhimmis and Harbis:
لا يقتل مسلم بكافر
No Muslim should be killed for killing a Kafir
They subscribe to the rule that for Qisas there must exist at minimum an equality between the murderer and the victim. And a Dhimmi is not equal to a Muslim.
It is a doubtful matter. And the rule is that Qisas and Hudud are not enforced when there is a doubt.