The 31-year-old, capped 86 times by his country, was replaced by Lee Dickson as club captain in 2015, having previously held the role for seven years.
Hartley, whose old deal had been due to expire at the end of the 2017-18 season, has made 229 appearances for Saints since joining them from Worcester Warriors in 2006.
In addition to his success with Saints, the hooker has led England to successive Six Nations titles under head coach Eddie Jones.
"Dylan has rightly received recognition as a superb captain for club and country," Saints director of rugby Jim Mallinder told BBC Sport.
"He led the team during a very successful period for us, has the respect of the rest of the squad and coaches alike, and knows what it takes to win silverware."
Last season, fellow England international Tom Wood skippered the side as Saints finished seventh in England's top flight.