What is meant in the hadith regarding the Prophet Jesus AS killing swine? Does it mean the Muslims are absolutely prohibited to use it in treatment for it is najis even if he is in a situation where there is no other permissible and suitable medicine at the time?
Alhamdulillah, all praise to Allah, the Lord of all worlds, praise and salutations to our beloved and revered Prophet Muhammad PBUH, his family members, wives, companions and all those who follow in his footsteps till the Day of Judgement.
From Abu Hurairah radhiyallahu ‘anhu, the Prophet PBUH said:
وَالَّذِي نَفْسِي بِيَدِهِ لَيُوشِكَنَّ أَنْ يَنْزِلَ فِيكُمُ ابْنُ مَرْيَمَ حَكَمًا عَدْلًا فَيَكْسِرَ الصَّلِيبَ وَيَقْتُلَ الْخِنْزِيرَ وَيَضَعَ الْجِزْيَةَ وَيَفِيضَ الْمَالُ حَتَّى لَا يَقْبَلَهُ أَحَدٌ حَتَّى تَكُونَ السَّجْدَةُ الْوَاحِدَةُ خَيْرًا مِنَ الدُّنْيَا وَمَا فِيهَا ثُمَّ يَقُولُ أَبُو هُرَيْرَةَ وَاقْرَءُوا إِنْ شِئْتُمْ وَإِنْ مِنْ أَهْلِ الْكِتَابِ إِلا لَيُؤْمِنَنَّ بِهِ قَبْلَ مَوْتِهِ وَيَوْمَ الْقِيَامَةِ يَكُونُ عَلَيْهِمْ شَهِيدًا
“By Him in Whose Hands my soul is, surely (Jesus,) the son of Mary will soon descend amongst you and will judge mankind justly (as a Just Ruler); he will break the Cross and kill the pigs and there will be no Jizya (i.e. taxation taken from non-Muslims). Money will be in abundance so that nobody will accept it, and a single prostration to Allah (in prayer) will be better than the whole world and whatever is in it.” Abu Huraira added “If you wish, you can recite (this verse of the Holy Book): — ‘And there is none of the people of the Scriptures (Jews and Christians) But must believe in him (i.e. Jesus as an Apostle of Allah and a human being) Before his death. And on the Day of Judgement, He will be a witness Against them.” 
Scholars stated several opinions regarding the meaning of Prophet Jesus AS killing pigs.
- Jabir said: “It is evidence that swine is prohibited in the teachings of the Prophet Jesus. He killed it as a denial of the Christians who state that it is halal in their religious teachings.” 
- Al-Muhallab said: “It means that everyone will embrace Islam and there is nothing different with it [Prophet Jesus].  He also said: “Both (breaking the cross and killing pigs) in Christianity is a deviant and transgressing act in their teachings to Prophet Jesus AS. The Prophet PBUH tells us that the Prophet Jesus AS will replace everything that is said to be from him with what the Prophet Muhammad PBUH has replaced them with and teach them that they are incorrect in their ways. This shows that the Prophet Jesus AS will come and confirm the teachings of the Prophet Muhammad PBUH, judging fairly for all its followers.” 
- Maulana Anwar Shah al-Kasymiri said: “Because the Christians ruled it permissible while our religion prohibited it. Likewise, in the shariah of Prophet Jesus AS. The opinion in some of our books that state that it is halal for them isn’t sahih. Moreover, originally it is prohibited for them everything that has nails as stated in al-Qur’an. They have differing opinions in interpreting it. The followers of Christianity thought that swine isn’t included in the prohibition and they ruled it halal in their damaged ijtihad. It is not because swine is halal in their shariah.” 
- Ibn Hajar al-‘Asqalani said: “Pigs are killed to show that it is prohibited to be eaten. It is also an insult to the Christians who claimed that they are the followers of Prophet Jesus AS, but then they ruled it halal to eat swine and like it.” 
Basically, the Prophet PBUH gave the freedom to his ummah to use certain ingredients as medicine in treating a certain disease, however, he prohibited the usage of prohibited matters. Narrated by Abu Darda’ RA, Rasullullah PBUH said:
إِنَّ اللَّهَ أَنْزَلَ الدَّاءَ وَالدَّوَاءَ ، وَجَعَلَ لِكُلِّ دَاءٍ دَوَاءً فَتَدَاوَوْا وَلاَ تَدَاوَوْا بِحَرَامٍ
“God has sent down both the disease and the cure, and He has appointed a cure for every disease, so treat yourselves medically, but use nothing unlawful.” 
Al-Tibi said: Indeed, Allah SWT has created every disease with its cure whether it is haram or halal. Thus, never opt for the prohibited means. 
Furthermore, based on a hadith narrated by Wa’il al-Hadrami, where Tariq bin Suwaid al-Ju’fi R.A asked Rasullullah PBUH regarding liquor. He forbade (its use) and he expressed hatred that it should be prepared. He (Tariq) said: I prepare it as a medicine, whereupon he (the Holy Prophet) said:
إِنَّهُ لَيْسَ بِدَوَاءٍ، وَلَكِنَّهُ دَاءٌ
“It is no medicine, but an ailment.” 
Imam al-Nawawi explained the ruling of treatment that uses najis, saying: “As for treatment with najis other than liquor, then it is permissible regardless of whether it is najis in its entirety other than an intoxicant. This is the opinion of the madhhab, stated and the one held by the majority of scholars.
Indeed, what makes it permissible to treat using najis only when there isn’t anything pure that can replace it. If there is another pure matter (to be used to treat it), then it is haram (to use) all types of najis without any khilaf. It is prohibited when there is another ingredient (pure ingredient) and it isn’t haram if there is nothing else available.” 
His opinion which states that najis other than liquor is permissible to be used in treatment is based on a hadith narrated from Anas bin Malik RA, he said:
أَنَّ نَفَرًا مِنْ عُكْلٍ ثَمَانِيَةً، قَدِمُوا عَلَى رَسُولِ اللهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ فَبَايَعُوهُ عَلَى الْإِسْلَامِ، فَاسْتَوْخَمُوا الْأَرْضَ فَسَقِمَتْ أَجْسَامُهُمْ، فَشَكَوْا ذَلِكَ إِلَى رَسُولِ اللهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ، قَالَ: أَفَلَا تَخْرُجُونَ مَعَ رَاعِينَا فِي إِبِلِهِ، فَتُصِيبُونَ مِنْ أَلْبَانِهَا وَأَبْوَالِهَا
“Eight persons from the tribe of `Ukl came to Allah’s Messenger (ﷺ) and gave the Pledge of allegiance for Islam (became Muslim). The climate of the place (Medina) did not suit them, so they became sick and complained about that to Allah’s Messenger (ﷺ). He said (to them), “Won’t you go out with the shepherd of our camels and drink of the camels’ milk and urine (as medicine)?” 
It is common knowledge that urine is najis. Thus, the suggestion from Rasullullah PBUH for them to treat their sickness by drinking the milk and urine of their camels become the supporting evidence for some fuqaha’ to rule it permissible to treat diseases with najis other than liquor on the condition that there aren’t any other pure ingredients that can be used.
Islam is very strict in prohibited matters by closing all the routes that could lead to haram whether it is clear or hidden. However, Islam never neglects exigent situations and the limit of man in facing such situations. It ruled it permissible for men in exigent situations to take the haram matter accordingly just to save themselves from destruction. Allah SWT explained:
فَمَنِ اضْطُرَّ غَيْرَ بَاغٍ وَلَا عَادٍ فَلَا إِثْمَ عَلَيْهِ إِنَّ اللَّـهَ غَفُورٌ رَّحِيمٌ
“But whoever is forced [by necessity], neither desiring [it] nor transgressing [its limit], there is no sin upon him. Indeed, Allah is Forgiving and Merciful.” 
At the same time, exigent situations make it permissible to do what is prohibited. This is based on a famous Islamic legal maxim:
الضَّرُورَات تُبِيحُ المحْظُورَات
“Exigent situations permit what is prohibited.”
For example, a medication that is produced from ingredients that are haram is permitted in medicine if it is recommended by a trusted doctor in their religious belief and practice as well as their expertise and it is proven that there is no other halal medicine that he can take at the time.
It can be concluded that the return of Prophet Jesus AS among others proves the truth of the teachings of Rasullullah PBUH when he breaks the cross and kills pigs to deny the belief of the Christians. It isn’t stated in detail in syarak whether all pigs will be killed or just some of them. As for interpreting the killing of swine by Prophet Jesus AS as an absolute prohibition of the usage of swine for medical purposes even when one is in an exigent situation is wrong. I advise all Muslims to not easily interpret this hadith that deviated from the knowledge discipline and true meaning of the hadith. Wallahu a’lam. Tamma bi hamdillah.