The phrase “it’s complicated” appears more than once in “Kill Your Darlings,” having nothing to do with Facebook relationship-status updates. It’s almost the movie’s signature.

As first uttered by Daniel Radcliffe — playing a 19-year-old Allen Ginsberg, when the poet was still finding his footing at Columbia University and just establishing friendships with the writers who would become known as the Beat Generation — it’s a reference to Ginsberg’s mentally ill mother (Jennifer Jason Leigh), who was in and out of sanitariums during the poet’s youth. The person that the line is spoken to is Ginsberg’s schoolmate, Lucien Carr (Dane DeHaan), a dashing ne’er-do-well and fellow aspiring writer who quickly becomes Ginsberg’s crush and tour guide to the literarily and sexually transgressive world of 1940s Manhattan, where the film is set.

“I love complicated,” Carr says in reply, with a purr halfway between seduction and a threat.

You’d better like complicated, too. Though based on historical fact, the film is awash in delicious and difficult ambiguities.

It centers on a killing that we glimpse at the film’s opening: Carr’s 1944 stabbing of David Kammerer (Michael C. Hall of “Dexter”), an older admirer who had known Carr since childhood. Though Carr never denied the murder — in fact, he turned himself in — it’s not entirely clear if the killing was an act of self-defense against a homosexual stalker, as Carr, who died in 2005, claimed, or something more sinister. From the movie, it’s even less apparent whether Carr — who served 18 months for manslaughter, and who went on to marry, fathering three children (including novelist Caleb Carr) — ever reciprocated Ginsberg’s puppyish lust.

The film shows the two young men exchanging a single, brief kiss, but it also shows Carr plagiarizing — soliciting and accepting term papers from both Kammerer and Ginsberg as his own course work. As depicted by first-time feature director John Krokidas, who wrote the script with journalist-turned-screenwriter Austin Bunn, Carr is a narcissistic master of psychological and emotional manipulation, allowing Ginsberg, and perhaps Kammerer, to fall in love with him — nay, encouraging it — without requital.

Whether he’s also a cold-blooded murderer is somewhat hedged, albeit just a little. “Kill Your Darlings” clearly doesn’t like Carr, though it stops just short of calling him a murderous, psychopathic liar.

The film is hardly a murder mystery anyway.

To a much greater degree, it’s the story of Ginsberg’s coming of age, both as a gay man and a writer. Krokidas and Bunn do a great job of portraying a world where literature is both sexy and dangerous.

Too often, films about artists aren’t able to capture the creative process. Here, Radcliffe not only makes for a relatable romantic hero, but also a credible literary one. He’s sensitive and increasingly fearless on both fronts. As the story unfolds, Ginsberg grows up before our eyes, both as a man and as a wordsmith, with Radcliffe marvelously rendering the naif’s sense of sexual and artistic discovery as he is pulled deeper and deeper into an unfamiliar world, one that’s both frightening and alluring.

As writer Jack Kerouac, Jack Huston is convincing enough. But it is Ben Foster’s William Burroughs — whom we first meet in a bathtub at a party, doing laughing gas, and whose voice is a cross between a dissolute radio DJ and a death rattle — that really sells the film’s sense of decadent rush.

The phrase “kill your darlings” refers to advice sometimes given to writers: always edit out the parts you’re most in love with, because they’re probably the most self-indulgent. In this tale of longing, loss and regret, it isn’t always possible to know who’s deluding oneself, or someone else.