‘What insults my soul,” Zadie Smith has written, “is the idea… that we can and should write only about people who are fundamentally ‘like’ us: racially, sexually, genetically, nationally, politically, personally.”

Both as novelist and essayist, Smith is one of the most subtle guides to the fraught terrain of culture and identity. The problem of “cultural appropriation” – writers and artists being called out for having stepped beyond their permitted cultural boundaries to explore themes about people who are not “fundamentally ‘like’ us” – is an issue that particularly troubles her. Too often these days, on opening a book or on viewing a painting, we are as likely to ask: “Did the author or painter have the cultural right to engage with that subject?” or: “Does he or she possess the right identity?” as: “Is it any good?”

So it is with the latest cultural firestorm over Jeanine Cummins’s novel American Dirt, which tells the story of a mother and son, Lydia and Luca, forced to flee their home in Acapulco and join the migrant trail to America after their family is slaughtered by a drugs cartel. Cummins wants Americans to stop seeing migrants as a “faceless brown mass” and to bear witness to the “tragedy of our making on our southern border”.

The novel’s supporters have hailed it as a Great American Novel, even the new The Grapes of Wrath. Its detractors point to the fact that Cummins is non-Mexican and that this wasn’t a story that was hers to tell, which is why she gets it all wrong.

Cummins’s critics are right that, as a work of fiction, American Dirt is shoddy and unconvincing. Its plot is as obvious as a narco gangster’s threat, the characterisations flat and the dialogue has all the depth of an episode of CSI. A detective at the bloody scene of the murder of Lydia’s family asks her whether she has anywhere to go. “Please don’t concern ourselves with our wellbeing,” Lydia responds. “Serve justice. Worry about that.” Even a CSI scriptwriter might be embarrassed.

Most of the anger about the novel has been generated, though, not by how Cummins writes but by who she is. Not Mexican. Not migrant. White.

Cummins herself sets up her critics’ argument in an author’s note: “I worried that as a non-migrant and non-Mexican I had no business writing a book set almost entirely in Mexico, set almost entirely among migrants.” She “wished someone slightly browner than me would write it”.

What both sides seem to have forgotten is what fiction is for. Fiction, as Smith observed in the inaugural Philip Roth lecture in 2016, “is a way of asking… what if I was different than I am?” Today, though, she notes elsewhere: “The old – and never especially helpful – adage write what you know has morphed into something more like a threat: stay in your lane.” To do so, Smith insists, is to deny the very possibility of fiction.

Cummins’s critics argue that this is to misunderstand their point. They are not forbidding white authors from writing about Mexican migrants, simply condemning a white writer writing so badly about the subject. But introducing Cummins’s whiteness as an issue is inevitably to shift attention away from the quality of the work and on to the nature of the author’s identity.

In any case, the context of the debate is a literary and artistic culture that increasingly does insist that people should stay in their lanes. “Where did the new orthodoxy arise that writers must only set stories within their own country of origin or nationality?” the writer Aminatta Forna has asked. In trying to constrain the imagination by identity, she points out, it’s not the privileged but those on the margins who most lose out. The “white male writer” is called simply “writer”; all other others have to be “hyphenated”, writing, in Nesrine Malik’s words, “as a”: as a woman, as a Muslim, as an immigrant.

Certainly, puncture the absurd hype around American Dirt as a novel that reveals the truth about the treatment of immigrants. Certainly, celebrate the Mexican and Latinx writers, from Luis Alberto Urrea to Valeria Luiselli (whose poetic, haunting Lost Children Archive has just been published in paperback), who have long explored the stories of migration with subtlety and power.

But let us not create gated cultures in which only those of the right identity have permission to use their imaginations. For, as novelist Kamila Shamsie tweeted (in response to another controversy over cultural appropriation): “ ‘You – other – are unimaginable’ is a far more problematic attitude than ‘You are imaginable’.” She might have added, “even if imagined badly”.

• Kenan Malik is an Observer columnist