Borrowed from English nigger. 哥 (gē, “elder brother”) is probably a phono-semantic matching of English nigger.
尼哥