The Bible records the Israelites as using kaneh-bosm as anointing oil, specifically in the Old Testament. The exact composition of the oil is unclear as kaneh-bosm is an Aramaic word, although most scholars believe that it was made from Calamus, a kind of palm.
Various sources which discuss the issue:
Although the consensus seems to be that the oil was made primarily from palm oil, a Polish anthropologist named Sula Benet claimed that kaneh bosm is really cannabis in the 1960s. Supposedly, it was merely been misidentified as calamus due to a mistranslation. From Wikipedia:
Other possible identifications have also been made. Sula Benet in Early Diffusion and Folk Uses of Hemp (1967), identified it as cannabis. Rabbi Aryeh Kaplan notes that "On the basis of cognate pronunciation and Septuagint readings, some identify Keneh bosem with the English and Greek cannabis, the hemp plant. There are, however, some authorities who identify the 'sweet cane' with cinnamon bark (Radak, Sherashim). Some say that kinman is the wood, and keneh bosem is the bark (Abarbanel)." Benet in contrast argued that equating Keneh Bosem with sweet cane could be traced to a mistranslation in the Septuagint, which mistook Keneh Bosem, later referred to as "cannabos" in the Talmud, as "kalabos", a common Egyptian marsh cane plant.
This appears to be a minority view among scholars, but it appears to be pretty popular in certain popular subcultures. Quoting the Vice article:
Lytton John Musselman, a Professor of Botany at Old Dominion University and author of A Dictionary of Bible Plants (Cambridge 2011), says he's familiar with the theory that keneh-bosem refers to cannabis, but remains wholly unconvinced, calling the evidence claiming marijuana to be part of the holy anointing oil “so weak I would not pursue it.” He also defends calamus as capable of producing medicinal effects on par with those described in the Bible.
“Calamus is a very important component of Ayurvedic medicine and has been shown to have efficacy,” according to Musselman. “For example, in Sri Lanka it is available in any herbal remedy shop and also universally grown in home gardens. The North American species was and is so important to Native Americans in the Northeast that land with natural populations is highly sought after.”
Even if one were to believe that the anointing oil is cannabis, did Jesus ever use it?
I am not aware of a specific mention of Jesus anointing with kaneh-bosm. There are four mentions of anointing with oil in the New Testament, but two of them are in epistles that don't have anything to do directly with Jesus's life (James 5:14 and Hebrews 1:8-9), one is Mary using nard oil (Mark 14:3-9), and the final is a reference to the Disciples using oil (Mark 6:13).
So the link between Jesus and the specific Old Testament anointing oil is tenuous at best as well.