The Mavs also secured a commitment from backup center Boban Marjanovic to re-sign with the team in the opening minutes of free agency, sources said, although they declined to reveal the terms of that deal.
Hardaway, 29, emerged as an important part of the Mavs' core the past two seasons after arriving in Dallas as part of the Kristaps Porzingis trade, when the Knicks' motivation to include him was shedding the $37 million he was owed in the last two seasons of his contract.
Serving as both a starter and sixth man for the Mavs, Hardaway averaged 16.2 points since recovering from an April 2019 surgery to repair a stress fracture in his lower left leg.
Hardaway thrived as a catch-and-shoot threat next to Luka Doncic, hitting 39.4% of his 3-point attempts in the past two seasons.
Hardaway was the Mavs' second-leading scorer in last season's playoffs, averaging 17 points in the seven-game series that Dallas lost to the LA Clippers in the first round, highlighted by a 28-point performance in the Mavs' Game 2 win.
Dallas also agreed to a two-year deal with wing Sterling Brown, sources said. Brown, 26, who played for Mavs coach Jason Kidd in Milwaukee as a rookie, averaged 8.2 points and 4.4 rebounds per game while shooting 42.3% from 3-point range for the Rockets last season.
In addition, wing Reggie Bullock also agreed to a deal with the Mavs, sources said, as Dallas emphasized adding 3-point threats around superstar point guard Luka Doncic. Bullock, 30, is a career 39.2% 3-point shooter, hitting 41.0% from long range for the New York Knicks last season.