The magical negro (sometimes called the mystical negro or magic negro) is a term generally used to describe a supporting, often mystical stock character in fiction who, by use of special insight or powers, helps the white protagonist get out of trouble. The word negro, now considered by many as archaic and offensive, is used intentionally to suggest that the archetype is a racist throwback, an update of the "Sambo" and "savage other" stereotypes. Spike Lee popularized the term, deriding the archetype of the "super-duper magical negro" in 2001 while discussing films with students at Washington State University and at Yale University.
I've noticed this about Hollywood films from the 1980s -- when people used not-racism to prove they were morally superior to the Soviets, or so they thought -- through the present day: if you need a wise character, or someone to give moral guidance, you trot out Morgan Freeman or another semi-stereotypical African-American.
This role is both positive, because they are shown as intelligent, and negative, because they are portrayed as being the outsider who has wisdom but cannot participate. That's an updated racial stereotype -- Step N Fetchit, Ph.D.
Since we know that most people get their knowledge of reality from television and movies, since their parents are probably divorced and working late each night anyway, we have to assume that they will sleepwalk into accepting this definition as part of reality. Interesting how hidden racial prejudice turns into ostentatious anti-bigotry stances.