The 33-year-old double promotion winner for the Hatters confirmed he was leaving Kenilworth Road earlier, ending a six year stint that saw him score 62 goals in 170 appearances.
Despite interest from a host of clubs, including former side AFC Wimbledon, it was the Cobblers he agreed to sign for, with manager Jon Brady saying: “Danny is an experienced striker who knows what it takes.
"He is an excellent professional and his experience and know how will be a real asset to us.
"He has been there and done it, he played a lot of football in the Championship last season and started the play-off semi-final second leg.
“He will fit in with our style. He has an excellent scoring record and his all round play is good.
"He can help get us and keep us high up the pitch.
“Not only that, his knowledge will be a real asset to the other strikers we have at the club.
"I know he had other options but we are delighted he has agreed to come to Sixfields.
"We think he is an excellent fit for us and we are really pleased to add Danny to the squad."
A statement from the Hatters’ official website said: “We can confirm that Danny Hylton will leave Luton Town at the end of his contract to join Northampton Town.
“Everyone at Kenilworth Road thanks Danny for his wonderful service, wishing him and his family every success in the future.”