In 2013, a queer teenager named Dwayne Jones went to a dance party dressed as a woman; when partygoers realized that this was not a cisgender woman, the 16-year-old was chased, beaten, stabbed, shot and run over by a car.

While the cause of same-sex marriage has advanced in the United States, the Caribbean has seen an increasingly vocal pushback against the granting of legal protections on the basis of sexual orientation and gender identity. For instance, at a rally in September of nearly 20,000 people in Jamaica to protest against L.G.B.T. rights, speakers opposed the decriminalization of sodomy, attacked same-sex marriage and warned about schools supposedly teaching about gender nonconformity or nonheterosexual orientations. Alveda King, a niece of the Rev. Dr. Martin Luther King Jr., appeared via video to advise Jamaicans not to fall for “the anti-procreation agenda” coming from America.

Such rallies help to enforce the need for queer Jamaicans to hide their identities — or leave. “A Brief History of Seven Killings,” Mr. James told The Guardian, “was a novel of exile.” Exile, certainly, is common in Caribbean literature; a large number of Caribbean authors write about the nations they grew up in while living elsewhere in the world, and so many of their novels depict characters who are conflicted about their national identities.

The exile of race, caused by our history through slavery, colonialism and indentured servitude, is woven into the poems of Derek Walcott and the novels of Jean Rhys. There are also the stories of those who left the islands to seek opportunities in the land of their colonizer, like the protagonists of Samuel Selvon’s novel “The Lonely Londoners.”

And then there is the experience of those of us, like Mr. James, who are queer — either the internal exile of living a lie at home to avoid ostracism or assault, or the external exile of fleeing home in order to finally be ourselves.

Caleb Orozco, a gay Belizean who mounted the first legal challenge to an anti-sodomy law in the Caribbean, is practically exiled in his own home. He leaves his house only for brief trips, in which he faces anti-gay slurs from passers-by, and has to fortify his home with six locks every time he returns.

When the house of the Jamaican activist and writer Dadland Maye was burned down, and he was attacked by men with guns, Mr. Maye had to seek political asylum in the United States. A former Carnival queen from Antigua named Tasheka Lavann made headlines in August when she fled to Canada because she felt unsafe after coming out as a lesbian. And such narratives are inscribed in Mr. James’s novel through the character of Weeper: A gay gangster from Jamaica who pretends at first to be heterosexual, Weeper makes peace with his being queer only when he travels to America.