Daniel Radcliffe continues stretching as an actor to play legendary Beat poet Allen Ginsberg as a gay Columbia University freshman discovering his sexuality in John Krokidas’ “Kill Your Darlings.” And although a murder takes place, the film is less a “Who done it?” than a “They did it,” set in 1940s Manhattan.

It’s clear from the opening scene that Ginsberg’s pal Lucien Carr (the charismatic Dane DeHaan, who handily steals the movie from the erstwhile Harry Potter) is responsible for killing an older man, David Kammerer, creepily played by Michael C. Hall (of “Six Feet Under” and “Dexter”).

To find out why, the debuting Krokidas and his co-screenwriter, Austin Bunn, show how Jersey boy Ginsberg fell into the hedonistic company of fellow Beat legends Jack Kerouac (Jack Huston) and William S. Burroughs (Ben Foster).

Kammerer is a former college teacher and ex-friend of Burroughs obsessed with Carr, whom he has followed and seduced on a couple of previous college campuses.

The mischievous Carr becomes close friends with Ginsberg, and they participate in various pranks (stealing books) and daring behavior for the era, including inhaling nitrous ­oxide and exploring each other’s bodies.

There’s also a touching subplot about Ginsberg’s poet father (David Cross) and his emotionally troubled mother (Jennifer Jason Leigh).

The excellently acted, fact-inspired “Kill Your Darlings” is a consistently interesting origin story with impressive period details that evoke not only Columbia’s Morningside Heights campus but Greenwich Village of seven decades ago.

It’s much more lively than “On the Road,” last year’s snoozy adaptation of the Kerouac novel that presented fictionalized versions of some of the same characters, including Kerouac’s girlfriend, briefly played in the new film by Elizabeth Olsen.