There was no obvious indication of suicide, NYPD spokesman Paul Browne said.
Ledger had an appointment for a massage at the SoHo apartment that is believed to be the home of the "Brokeback Mountain" actor, Browne said. The massage therapist and a housekeeper found his naked body in the bed at about 3:30 p.m. They tried to revive him, but he was already dead.
Paparazzi and gawkers gathered outside, and several police officers put up barricades to control the crowd of about 300. Onlookers craned their necks as officers brought out a black body bag on a gurney, took it across the sidewalk and put it into a white medical examiner's office van.
As the door opened, bystanders snapped pictures with camera phones, rolled video, and said, "He's coming out!"
An autopsy was planned for Wednesday, medical examiner's office spokeswoman Ellen Borakove said.
While not a marquee movie star, Ledger was an award-winning actor who chose his roles carefully rather than cashing in on big-money parts. He was nominated for an Oscar for his performance as a gay cowboy in "Brokeback Mountain," where he met Michelle Williams, who played his wife in the film. The two had a daughter, now 2-year-old Matilda, and lived together in Brooklyn until they split up last year.
It was a shocking and unforeseen conclusion for one of Hollywood's bright young stars. Though his leading man looks propelled him to early stardom in films like "10 Things I Hate About You" and "A Knight's Tale," his career took a notable turn toward dramatic and brooding roles with 2001's "Monster's Ball."
After his role in "The Patriot" he was voted one of People Magazine's 50 most beautiful people in 2001.
"I had such great hope for him," said Mel Gibson, who played Ledger's vengeful father in "The Patriot," in a statement. "He was just taking off and to lose his life at such a young age is a tragic loss."
Ledger eschewed Hollywood glitz in favor of a bohemian life in Brooklyn, where he was one of the borough's most famous residents. "Brokeback" would be his breakthrough role, establishing him as one of his generation's finest talents and an actor willing to take risks.
Ledger began to gravitate more toward independent fare, including Lasse Hallstrom's "Casanova" and Terry Gilliam's "The Brothers Grimm," both released in 2005. His 2006 film "Candy" now seems destined to have an especially haunting quality: In a particularly realistic performance, Ledger played a poet wrestling with a heroin addiction along with his girlfriend, played by Abbie Cornish.
But Ledger's most recent choices were arguably the boldest yet: He costarred in "I'm Not There," in which he played one of the many incarnations of Bob Dylan - as did Cate Blanchett, whose performance in that film earned an Oscar nomination Tuesday for best supporting actress.
Curiosity about Ledger's final performance will likely stoke further interest in the summer blockbuster. "Dark Knight" director Christopher Nolan said earlier this month that Ledger's Joker would be wildly different from Nicholson's.
"It was a very great challenge for Heath," Nolan said. "He's extremely original, extremely frightening, tremendously edgy. A very young character, a very anarchic presence that taps into a lot of our basic fears and panic."
Ledger told The New York Times in a November interview that he "stressed out a little too much" during the Dylan film, and had trouble sleeping while portraying the Joker, whom he called a "psychopathic, mass-murdering, schizophrenic clown with zero empathy."
"Last week I probably slept an average of two hours a night," Ledger told the newspaper. "I couldn't stop thinking. My body was exhausted, and my mind was still going." He said he took two Ambien pills, which only worked for an hour, the paper said.
Ledger was a widely recognized figure in his Manhattan neighborhood, where he used to shop at a home and children's store. Michelle Vella, an employee there, said she had frequently seen Ledger with his daughter - carrying the toddler on his shoulders, or having ice cream with her.
"It's so sad. They were really close," said Vella. "He's a very down-to-earth guy and an amazing father."
2Before settling down with Williams, Ledger had relationships with actresses Heather Graham and Naomi Watts. He met Watts while working on "The Lords of Dogtown," a fictionalized version of a cult classic skateboarding documentary, in 2004.
Ledger was born in 1979 in Perth, in western Australia, to a mining engineer and a French teacher, and got his first acting role playing Peter Pan at age 10 at a local theater company. He began acting in independent films as a 16-year-old in Sydney and played a cyclist hoping to land a spot on an Olympic team in a 1996 television show, "Seat."
After several independent films, Ledger moved to Los Angeles at age 19 and costarred opposite Julia Stiles in "10 Things I Hate About You." Offers for other teen flicks soon came his way, but Ledger turned them down, preferring to remain idle than sign on for projects he didn't like.
"It wasn't a hard decision for me," Ledger told the Associated Press in 2001. "It was hard for everyone else around me to understand. Agents were like, `You're crazy,' my parents were like, `Come on, you have to eat."'