Harry Potter star Daniel Radcliffe is set to play gay beat generation poet Allen Ginsberg in John Krokidas upcoming thriller Kill Your Darlings, TwitchFilm.com reported.

According to the report, the film is based on actual events.

Kill Your Darlings revolves around the relationships between Allen Ginsberg, Jack Kerouac and Lucien Carr. Carr, for his part, is credited for connecting Ginsberg, Kerouac and William S. Burroughs but, most notoriously, served time for the 1944 murder of his lover David Kammerer,” the site wrote.

Radcliffe will reportedly step into the role after he walks away from his Broadway run in How to Succeed in Business Without Really Trying in January. Glee co-star Darren Criss will take over Radcliffe's role for his Broadway debut.

Last year, James Franco played Ginsberg in the film Howl. The movie looked at the poet's most famous poem, Howl, which became the subject of a landmark obscenity trial that tested the boundaries of the First Amendment. Aaron Tveit played opposite Franco as Peter Orlovsky, Ginsberg's lover.