Ellis hit 16 of 27 field-goal attempts, bouncing back from his 4-for-22 performance Sunday in a loss at Phoenix. In three games this season against the Spurs, Ellis is averaging 34 points.
Dirk Nowitzki collected 15 points and 13 rebounds and Chandler Parsons added 15 for the Mavericks.
Kawhi Leonard led the Spurs with 19 points and Danny Green added 17.
The victory pulled Dallas within percentage points of sixth-place San Antonio in the Western Conference.