Nowitzki shot 8-of-20 from the field but hit all 10 of his free throws, including eight in the fourth period to hold off the Grizzlies, who lost for the third time in the last four games.
Mike Miller led the Grizzlies with 32 points, including 20 in the fourth quarter. His 30-footer with 5 seconds left got Memphis within 93-91, but a pair of free throws by Nowitzki put Dallas up by 95-91.
Chucky Atkins then hit another 30-footer for Memphis with less than a second left for the final margin.
Jerry Stackhouse and Jason Terry added 20 points apiece for Dallas, which has won 24 of 26. Erick Dampier scored 15 points, missing only one of his seven shots from the field, and grabbed eight rebounds. Nowitzki had 11 rebounds.