The Bucks pulled away in the fourth quarter after leading by six heading into the final 12 minutes.
Ellis had 17 points, 11 assists and eight rebounds. His night was highlighted by a 43-foot desperation shot that went in as time expired in the opening period.
Brandon Jennings produced 19 points for the Bucks. Milwaukee won despite making only 40 percent of its shots from the field. The Bucks had eight fewer turnovers than did Sacramento and 10 more rebounds.
Luc Mbah a Moute pitched in 17 points for Milwaukee and Ersan Ilyasova had 16.
Sacramento lost its second straight after winning three in a row. The Kings were led by 17 points by Tyreke Evans.
The Kings played without center DeMarcus Cousins, who was serving a one-game suspension.