Mars, whose real name is Peter Hernandez, was arrested last year after a Hard Rock Hotel employee spotted a bag of cocaine on him.
Under the agreement, the Grammy nominee must appear in court next month and enter his plea. He'll subsequently be fined $2,000, sentenced to a year of informal probation and 200 hours of community service and drug counseling. Because he's a first-time offender, Mars' record will be wiped clean if he fulfills the terms of his sentence.
If Mars had been convicted of felony possession of a controlled substance, he would have faced up to four years behind bars.