The foundational formulation is Rabbeinu Bachya, who classifies four types of wicked people, placing 'chacham lehara' among them: one who possesses genuine intellectual virtues together with base character traits, and who directs his intellect entirely toward evil rather than good, proving this from the pasuk describing those who are 'wise to do evil, but to do good they have no knowledge.'
Resisei Layla 21 generalizes this structure, teaching that every human faculty—wisdom, joy, strength—divides into a righteous and a wicked application, so that just as there is a 'chacham baTorah' there is also a 'chacham lehara,' and just as there is joy of mitzvah there is joy of wanton desire.
Daas Torah (Rav Yerucham Levovitz) sharpens the danger inherent in this concept, arguing that wisdom is not merely insufficient for moral completion but can itself intensify corruption, since greater stature brings a correspondingly greater evil inclination, so that the most degraded acts are often committed by the intellectually greatest.
Peri Tzadik, Vayishlach 10 locates this phenomenon in the yetzer hara's capacity to disguise itself as a 'talmid chacham' showing the way to good while actually calling evil good, citing the case of the three kings and four commoners who were themselves great in Torah yet used that greatness to mislead, so that their very scholarship became 'deadly poison for those who turn leftward with it.'
Chochma uMusar (Alter of Kelm) describes how a person whose character has already become corrupted will use his unspoiled intellectual faculties in service of his evil inclination—to deceive others and justify wrongdoing—showing that the wicked use of wisdom is a tool the yetzer hara recruits rather than something separate from intellect.
Notes by Rabbi Yehoshua Hartman on Derekh Chayim 5:19:79 and Chiddushei Aggadot, Sanhedrin 106 both associate the 'chacham lehara' figure with deceit and scheming rather than true intellect, the former noting that one who is wise to do evil is necessarily a master of trickery, and the latter describing one who devises deceptive schemes—such as advising Moav to expose its daughters—as a master of deceit, since deceit itself lacks genuine existence compared to true intellect.
Chiddushei Aggadot, Sotah 21 situates a related but distinct failing within the beit midrash itself, describing a Torah scholar as 'cunning' when his learning lacks genuine grasp of the reasons behind the Mishnayot, and as outright 'wicked' when he has not properly studied or learned from true Torah scholars.
Avot DeRabbi Natan 9:4 brings the biblical paradigm for this type in Yonadav ben Shimah, described as 'a very wise man' who used that wisdom to counsel Amnon toward wickedness, deriving from this the warning not to attach oneself to a wicked person even for the sake of Torah.
Poked Akarim 4:18 extends the theme to figures such as Yarovam, Achav, and Menashe, whom Chazal praise as especially wise even though their wisdom nourished their wickedness, since even the most degraded could attain kingship through the greatness of their intellect.
Several sources develop the broader background of the yetzer hara that such wisdom can be conscripted to serve: Kiddushin 30b teaches that the yetzer hara renews and intensifies itself daily and seeks a person's destruction, Sukkah 52a catalogs its seven names including 'evil' and 'enemy,' Bereshit Rabbah 9:7 teaches that the yetzer hara is itself called 'very good' since without it no one would build, marry, or engage in commerce, and Avot DeRabbi Natan 16 describes how the evil inclination is born with a person thirteen years before the good inclination.
Mishneh Torah, Repentance 5:1-2 frames the underlying free-will doctrine that allows a person to become 'wise' in either direction, teaching that every person is capable of becoming righteous like Moshe or wicked like Yarovam, wise or foolish, since nothing compels a person toward either path but his own choice.
Yeshayahu 5:20 supplies the prophetic condemnation most directly tied to this inversion of values, decrying those who call evil good and good evil, put darkness for light and light for darkness, which several of the above sources treat as the paradigm for wisdom applied destructively.
Rav Kook (Ein Aya, Berakhot 2:39) warns that even good counsel originating from an evil source will ultimately cause harm, since the evil inclination itself is identified with the evil thought rather than merely its content, reinforcing that wisdom's moral value depends on its source and direction.
Rav Eliezer Melamed (Peninei Halakhah, Likkutim II 1:5) rules practically that one is permitted, even obligated, to hate a truly wicked person, deriving this from Pesachim 113b's distinction between a fellow Jew in mitzvot and one who is not, and from the pasuk that fear of God consists of hating evil, which frames the wicked use of wisdom as deserving active opposition rather than mere description.
HaKtav VeHaKabalah, Devarim 16:19 distinguishes natural sharpness ('pikeach') from true Torah wisdom ('chacham'), noting that a person can be naturally sharp without being wise in Torah, or can know Torah's laws yet not conduct himself by them, and in such a deviation may pervert justice, acquit the wicked and condemn the righteous.
Malbim and Meiri further refine the concept of the 'chacham lev,' the former defining him as one whose heart is governed by wisdom's images and distinguishing him from the 'tzaddik' who actively applies wisdom to righteous action, and the latter describing 'rah ayin' as one who withholds his wisdom from others rather than one who actively uses it for harm.
Chochma uMusar 1 p. 245 and Chochma uMusar 1 p. 63 add that wisdom accomplishes little for a person whose heart remains evil, since the intellect formulates matters truthfully whether toward good or evil, and that true wisdom is measured by one who learns to restrain his own will rather than merely by intellectual sharpness.