She will serve a year of probation and avoid a felony charge under the terms of a plea deal worked out with prosecutors. The celebrity heiress pleaded guilty to drug possession and obstructing an officer.
Hilton, 29, must complete a drug abuse program, pay a $2,000 fine and serve 200 hours of community service.
Hilton - wearing a champagne-colored blouse, a black pencil skirt and black platform heels - told Justice of the Peace Joe M. Bonaventure she was in possession of cocaine.
When he asked what she did to obstruct justice, Hilton, swaying side to side, responded, "I said that the purse wasn't mine to the officer," and acknowledged that she had bought it months earlier.
When asked why she didn't fight the charge, her attorney, David Chesnoff said, "Ms. Hilton accepts the responsibility."
She faces a year in jail if she violates the probation and is arrested for anything other than a minor traffic violation.
Bonaventure told Hilton there are consequences to breaking the law.
"The purpose of this at this point is that you change your conduct," Bonaventure said. "The Clark County Detention Center is not the Waldorf Astoria."
The plea agreement does not require Hilton to be assigned a probation officer, meaning she won't have to report to anyone.
She originally faced a felony cocaine possession charge that would not have resulted in jail time.
Clark County prosecutor David Schubert called the plea deal, "a fair resolution."
"Our main concern is that Ms. Hilton stay out of trouble over the next year," Schubert told Bonaventure, who also presided over O.J. Simpson's armed robbery case in 2007.
Chesnoff said Hilton would continue to volunteer with animal rights groups and children's hospitals to meet the requirements of the plea agreement.
"I know Ms. Hilton is contrite and accepts the responsibility for her actions," Chesnoff said.
Chesnoff said Hilton would attend an outpatient substance abuse treatment program.
Hilton was arrested Aug. 26 inside the Wynn resort, after police say a small plastic bag containing 0.8 of a gram of cocaine spilled out of a Chanel purse she had been carrying as she reached for a tube of lip balm in front of a police lieutenant.
Hilton told police the purse and cocaine were not hers, but claimed some items in the bag belonged to her, including rolling papers, $1,300 in cash and several credit cards.
She was pulled aside by police after her boyfriend, Las Vegas nightclub mogul Cy Waits, 34, failed field sobriety tests given by a motorcycle officer.
The couple was stopped in a black Cadillac Escalade after the officer smelled a "vapor trail" of marijuana smoke.
Hilton was banned from two Wynn resorts on the Las Vegas Strip after the arrest, and her boyfriend was dismissed as a nightclub partner.