Professor James Moriarty, the arch-enemy of Sherlock Holmes, is a mathematics professor turned the world's only 'consulting criminal'. His genius is equal to, if not perhaps greater than, Holmes himself.
Moriarty is a machiavellian criminal mastermind whom Holmes describes as the 'Napoleon of crime'. Conan Doyle borrowed this phrase from a Scotland Yard inspector who was referring to Adam Worth, a real-life criminal mastermind, who is one of the individuals upon whom the character of Moriarty was based.
The character was introduced primarily as a narrative device to enable Conan Doyle to kill Sherlock Holmes, and only featured in two of the Sherlock Holmes stories.
Moriarty is a genius, philosopher and an abstract thinker, with a brain of the first order. As Holmes puts it,
Moriarty has been proven to be the most dangerous of all criminals that Holmes encounters. In the short story 'The Adventure of the Final Problem', during a fight with Holmes above the Reichenbach Falls, Moriarty falls to his death.