Moriarty is almost equal to Sherlock, actually, both of them are quite similar in characteristics. But the reason why Sherlock is more intelligent is that his main motive is to solve crimes while Moriarty just wants to destroy Sherlock. he will never see past him which makes Sherlock his weak point.