Crack = freebasing cocaine = base.
Bay Area rapper Lil B used to be insulted by people who called him "based", essentially meaning crackhead. He reappropriated it to mean outspokenly being yourself while actively disregarding what anybody else thinks, and started also going by Based God. That's it.
Which was originally used on the internet as a replacement/slang for "best" but apparently I am the only one who remembers that. Everyone seems to think it started as the cringelord PCM shit, but it absolutely meant "best" for years before that.
It definitely meant crackhead in hip-hop too, but it had a double meaning of "best" as well. Based God = best crackhead god.