One of Africa's most powerful writers and a founder of the Nairobi-based literary network Kwani, Wainaina published a story online at the weekend that announced his sexual orientation, entitled "I am a Homosexual, Mum".
The story has generated widespread support on social media, although also earning strong criticism from some.
"Ten million thank yous to the thousands of Africans and others who have given all kinds of public love, support," Wainaina said in a message on Twitter. "We live in a beautiful continent."
"I, Binyavanga Wainaina, quite honestly swear I have known I am a homosexual since I was five," he wrote in the short story.
Also Read
'I am a homosexual, mum'."
Homosexuality is outlawed in Kenya, although arrests are rare.
"There is no country in the world with the diversity, confidence and talent and black pride like Nigeria," Wainaina said, adding that the "anti-gay marriage law shames us all."
In Kenya's neighbour Uganda, President Yoweri Museveni this month refused to approve a controversial bill that would have seen homosexuals jailed for life, but he also suggested homosexuality was caused by a genetic flaw, or a need to make money.