Salling pleaded guilty in December after authorities said a search of his computer and a thumb drive found more than 50,000 images of child porn. He was scheduled to be sentenced March 7, and prosecutors planned to ask a judge to send him to prison for four to seven years.
A law enforcement official not authorized to speak publicly said Salling was found hanging in a riverbed area in the Tujunga neighborhood of Los Angeles. Ed Winter, assistant chief investigator for the Los Angeles County coroner's office, said the death is being investigated as a suicide.
Winter said Salling was pronounced dead at 9 a.m. Tuesday, six hours after police received a report that he was missing.
"Mark was a gentle and loving person, a person of great creativity, who was doing his best to atone for some serious mistakes and errors of judgment," Salling's attorney, Michael J. Proctor, said in an email to The Associated Press.
Proctor didn't discuss the cause of death, but said the actor's family appreciated the support it is receiving and asked that a request for privacy be respected.
The darkly handsome actor had appeared in only a handful of projects before his breakout role in "Glee," the popular Fox TV series about students in a high school glee club and their circle of family and friends. It aired from 2009-15.
Earlier credits included 1996's "Children of the Corn IV: The Gathering," a 1999 guest role on the Chuck Norris series "Walker, Texas Ranger" and a part in the 2014 TV movie "Rocky Road."
A singer-songwriter as well as actor, he released two albums: "Smoke Signals" in 2008 and "Pipe Dreams" in 2010.
Following "Pipe Dreams'," release, Salling told The Associated Press he had been a singer-songwriter long before he became an actor.
"I put out a record before. It went triple cardboard," he joked. "I was very excited about selling 125 units for that but you know this is something I've been doing my whole life. It's not something that I just decided to randomly do now. This is not the first. It won't be the last. And I hope people enjoy it and have something to look forward to for the next round."
He said he chose the album's songs from 50 to 60 he had compiled over several years.
Salling's character on "Glee" was a member of the school's football team who ends up joining the glee club. One of his character's friends was another jock-turned-singer, Finn Hudson, who was played by Cory Monteith.
Monteith died in 2013 from a toxic mix of alcohol and heroin, according to a coroner's finding.
Mark Wayne Salling was born Aug. 17, 1982, in Dallas, the youngest child of John Salling, an accountant, and his wife, Condy, a school secretary.
Like his character on "Glee," Salling was a jock, taking part in wrestling, rugby, basketball and other school sports when he wasn't playing guitar or piano. By high school he was playing gigs in local bars.
Soon after finishing school he moved to California to pursue an acting and music career and to study guitar at the Los Angeles Music Academy.
After seven years of failing to land any substantial roles, and having released just one album, Salling was ready to give up when his older brother, Matt, exhorted him to keep trying. Soon after he landed the role on "Glee," where he quickly captivated audiences. His performance of Neil Diamond's "Sweet Caroline" even won praise from Diamond himself.
Salling said his own musical preferences covered a wide range from jazz to country to rock, pop and hip-hop. He cited Radiohead's Thom Yorke and Trent Reznor of Nine Inch Nails as among his musical influences.
He is survived by his parents and brother.
AP Television Writer Lynn Elber contributed to this story.
This story has been corrected to show that Salling's body was found in a riverbed area in the Tujunga area, not a home.
Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.