I think the greatest to rap was 2pac / makaveli the don. Loyal to the game and never sold out that's why they took him out
I'm hesitant to call anyone the best (especially since I don't listen to much rap anyway, more of a metalhead) but my personal favorites are Eminem and Tyler The Creator. least favorite is probably Lil Wayne, though I was surprised to find some of his stuff was actually really good (there's a verse he does at the beginning of an Eminem song that's great)... just not anything that's ever played on the radio.
I will forever be stuck between 2pac and gza. Nobody can top pacs flow, but the gza's play on words and metaphors are simply genius..
Nas and Lupe are the greatest lyricists I know of. Danny Brown is the trillest and smartest mothafucka as of now.