The 34-year-old Mayweather also was ordered to complete 100 hours of community service and pay a $2,500 fine.
The plea deal avoids trial on felony allegations that he hit his ex-girlfriend and threatened two of their children during an argument at her home in September 2010.
Prosecutor Lisa Luzaich told Judge Melissa Saragosa that Mayweather has been in trouble before and hasn't been punished.
"He just continually gets himself into trouble and he is able to get himself out of it as well," she said. "Essentially it is because he is who he is and is able to get away with everything."
"He just continually gets himself into trouble and he is able to get himself out of it as well. Essentially it is because he is who he is and is able to get away with everything.
"The only thing that's going to get this man's attention is incarceration," the prosecutor said.
Mayweather stood still in a striped olive vest and made no reaction when the judge imposed the sentence. He was told to report to jail on Jan. 6.
Mayweather and his manager, Leonard Ellerbe, declined comment outside the courtroom.
Attorney Karen Winckler had argued that the public would benefit more if Mayweather performs 100 hours of community service with children.
Winckler said she wanted to confer with Mayweather before deciding whether to appeal.
The judge said she was swayed by Mayweather's admission that he hit Harris and twisted her arm, and that two of their children, ages 9 and 10 witnessed the attack.
Saragosa noted that police reported Mayweather threatened to kill or make Harris "disappear," and that their 10-year-old son ran from the house and jumped a back gate to fetch security. Mayweather had taken cellphones belonging to Harris and the two boys, she said.
"Punishment is appropriate," Saragosa said. "No matter who you are, you have consequences to your actions when they escalate to this level of violence."