The 34-year-old will be available for the Steelbacks’ first six fixtures in this year’s competition, with the deal subject to clearance from the Pakistan Cricket Board.
Afridi will bring huge experience to Wantage Road, having played 77 Twenty20s for his country, taking 81 wickets with his leg spin at an average of 22.4.
While his batting average is under 20, he remains a match-winner on his day.
Afridi was the man of the match in the final of 2009 ICC World Twenty20 after smashing an unbeaten 54 against Sri Lanka and has been one of the more high-profile players in the limited overs formats for more than a decade.
Northants head coach David Ripley said: “This is a very exciting signing for us.
“Shahid is without doubt the most outstanding spin bowling all-rounder in one-day international cricket of the last five years. He is a fierce competitor and undoubted match winner with bat and ball.”
Afridi, who will link up with Northants on May 15, last featured on the county circuit with Hampshire four years ago and has also represented Leicestershire, Derbyshire and Kent.
He said: “I am looking forward to playing in the NatWest T20 Blast. I have always enjoyed playing in England, where I have always found the crowds good natured and knowledgeable.
“I am very happy to be joining a good Northants squad in the search for Twenty20 success.”