D&D from the start was strongly inspired by pure heroic fantasy writers like Michael Moorcock.
Moorcock, a pure heroic fantasy writer? Definitely not in the sense you mean it. The genre he wrote is nominally heroic fantasy, but Elric of Melniboné of the Elric saga - maybe his most famous creation - is almost the prototypical anti-hero.