A mob reportedly punched and kicked at least two gay men who were photographed signing a condolence book for those killed in Florida in an image which was then circulated online.
The photo of the six men was shared by the US embassy based in Abidjan, the Ivorian capital, on its site and then widely posted across social media.
Despite the book also being signed by the west African country's prime minister, Daniel Kablan Duncan, a mob tracked down two of the men in the photo and shouted anti-gay slurs at them.
One of the men, who gave his name as Louna, said he was walking in his neighbourhood in the capital when a mob pushed him to the ground, stole his phone and wallet, and beat him.
"I can't go out. I don't know who might recognise me," he told the Thomson Reuters Foundation, adding that he feared he would never be able to return home.
"I don't have a life anymore," said another 36-year-old, who only gave his nickname for fear of further attacks.
The other four men were also verbally abused and all six have fled their homes.
Louna said he did not know the photo had been posted online until a friend called to say he had seen it.
All the men said they had not been contacted by the US embassy for their permission to use the photos. But the embassy countered that it had consulted activists at three LGBT organisations in the country, who had all given the green light to publish.
Elizabeth Ategou, a press officer, said the embassy "deeply regrets that any individuals were attacked based on any kind of orientation they might have".
One of the activists, who also insisted on anonymity, said he would never have given permission had he known those in the picture would be identified so explicitly as members of the "LGBTI community."
The group at the embassy were writing messages of support in response to gunman Omar Mateen opening fire inside a gay nightclub in Florida which killed 49 people. The photo has now been removed from the embassy's website.
Same-sex relationships are not explicitly illegal in Ivory Coast, in part because the country was once a French colony and has not inherited Britain's anti-sodomy laws, but LGBT people do not have the same legal protection as hetereosexual individuals.
It is not the first major incident of hate crime against the LGBT community in the country. In January 2014, a mob ransacked the Abidjan headquarters of the country's most prominent gay rights organisation.
Meanwhile, the US embassy in Abidjan has strengthened ties with the country's LGBT activists following an Obama administration memorandum in 2011 that empowered "all agencies engaged abroad" to promote and protect the human rights of sexual minorities.
Additional reporting by the Associated Press
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies