Russian-born Yelchin died shortly after 1 a.m. after he apparently stepped out of his car in the steep driveway of his Los Angeles home and it rolled backwards, said Jenny Houser, spokeswoman for the Los Angeles Police Department.
"The car pinned him against a brick wall and a security fence and that trauma led to his death," Houser said.
Yelchen was due at a rehearsal and when he did not show up, friends went to his house and found him dead, Houser said. No foul play was suspected but the accident is under investigation, she said.
Yelchen's death caused consternation among actors and others who had worked with him or knew him. Many reacted on Twitter.
"Still in shock. Rest in peace, Anton," tweeted Justin Lin, who directed Yelchin in his third Star Trek movie. "Your passion and enthusiasm will live on with everyone that had the pleasure of knowing you."
"I loved Anton Yelchin so much," wrote John Cho, who plays Sulu in the current Star Trek. "He was a true artist - curious, beautiful, courageous. He was a great pal and a great son. I'm in ruins."
The actor was best known as playing Chekov in the Star Trek movie series, including 2009's "Star Trek," 2013's "Star Trek Into Darkness" and the upcoming "Star Trek Beyond," set to open on July 22.
Yelchin was born in Russia, the son of two figure skaters, and emigrated to the United States as an infant.
He has appeared in numerous films and was in the TV series "Huff."
Hank Azaria, who acted in "Huff" with Yelchin, said in Twitter he was devastated. "He was a very sweet kid. My heart goes out to his family."
Early in his film career as a teenager, Yelchin gained wide attention when he appeared with Anthony Hopkins in film "Hearts in Atlantis" in 2001 and with Robin Williams in the "House of D" in 2004.
Yelchin played Jacob Clarke in the Steven Spielberg miniseries "Taken" and also appeared in the films "Terminator," "Salvation," "Charlie Bartlett," "Fright Night," "Like Crazy," and "Only Lovers Left Alive" between 2007 and 2013.
Film and television actors Charlie Weber and Olivia Wilde praised Yelchin's talents.
"Any young actor who wants to see someone doing it for real, watch anything Anton Yelchinever did," Weber wrote. "Fabulous actor who will be missed."
Wrote Wilde: "Anton Yelchin was a bright, brilliant talent, and a truly kind person,' wrote Wilde. "I was so taken by him, and won't ever forget his sweet smile. RIP."