Usually medicine containing animal byproduct are not halal. Islamic perspective is that, if it is derived from pork, unlawful animal or an animal not Islamically slaughtered, then it will be impure, thus unlawful (haram). However, if it is derived from a Halal source, then there is permissibility in its usage. In the case of doubt, it will be treated as Haram.
The Hanafi jurist, Imam al-Haskafi (Allah have Mercy on him) says:
“The Scholars differed regarding the usage of haram medication. The apparent opinion in the (Hanafi) school is that it is haram. However it is said that, it will be permissible when the medicine is known to be effective and there is no other alternative, just as there is a dispensation in drinking alcohol for a person dying of thirst, and the fatwa is given on this opinion.” (Durr al-Mukhtar, 1/210)
In view of the above text from one of the fundamental Hanafi reference books, it will be permissible to use medicines that have impure and unlawful substances in them, provided the following conditions are met:
1) It is reasonably known that the medicine will be effective, and is needed;
2) There is no permissible alternative reasonably available;
3) This has been established by an expert Muslim doctor who is at least outwardly upright and god-fearing.
https://islamqa.org/hanafi/daruliftaa/7836
Alternative recommendations:
More good options:
- MSM
- Stinging nettle
- Bromelain
- Vitamin E
- Devil's claw
https://www.webmd.com/arthritis/features/alternatives-and-supplements-for-arthritis-joint-pain#1