PARK CITY—“Kill Your Darlings,” which premiered Friday at Sundance, follows the true events of poet Allen Ginsberg’s transformation from emotional and sexual repression to the realization of his unorthodox genius and homosexuality—a process that is sparked by a tragic murder and culminates in Ginsberg’s essential role in the beat movement of the 1950s.

Ginsberg, played by Daniel Radcliffe, starts off in “Kill Your Darlings” as a rather respectful and obedient son, eager to begin his education at Columbia University. By the end of the film, he is—in the words of director John Krokidas—“a poet and a rebel.” As life imitates art, Radcliffe also seems to have reached a similar breaking-out point in his career in his evolution from the conventional Harry Potter we all know to this character.

While a beautiful and thought-provoking film, “Kill Your Darlings”—which also features Elizabeth Olsen, Jennifer Jason Leigh, Kyra Sedgwick and Michael C. Hall—is marked by controversy because of its explicit scenes. Raw, daring and a little startling, the film Krokidas constructed (and co-wrote with Austin Bunn) doesn’t hold back in presenting an honest and uncensored picture of the early stages of the beat generation’s drug experimentation, sexual exploration and rejection of the social conventions of the 1940s and ’50s.

The film explores how a murder in 1944 draws together Ginsberg, William Burroughs and Jack Kerouac—some of the headliners of the beat generation.

In an audience Q&A session following the film’s premiere, Radcliffe acknowledged that he tends to appreciate unconventional and even “weird” roles, which fits well with the young Ginsberg as he comes out as gay to himself and his friends.

Ginsberg was not the only person to “come out” in the film. Krokidas introduced the movie Friday by dedicating it to his late father, regretting that he never had a chance to come out to his dad before he died.

“This movie to me is so much about being the age I was when my father passed away, 21, and finally having the courage and conviction to tell the world who you are,” Krokidas said.

For the movie sound track, Krokidas also took the term “beat poet” quiet literally, selecting rhythmic music to swell across scenes cut with such a cadence that the whole film seemed to rise and fall like a well-planned drum beat. In one extended scene, Krokidis cuts between scenes of Ginsberg drumming his hands and arms on tables, chairs, people and walls, and Ginsberg and his fellow beat generation rebel Lucien Carr (Dane DeHaan) in a drugged haze of inspiration for their rebellious movement.

The captivating and complicated chemistry between Ginsberg and Carr is spellbinding, magnetic and tragic, and Radcliffe’s passionate portrayal of Ginsberg’s struggles is beautiful enough to be poetic.