Both clubs announced the 23-year-old had moved for an undisclosed fee.
Crooks joined Rangers from Accrington under freedom of contract last summer, but his impact was delayed by an ankle operation he underwent after he signed a pre-contract deal.
The tall midfielder only played three games and his sole start came in a 2-0 defeat by Hearts, before he was loaned to Scunthorpe in the second half of last season.
Crooks was deemed surplus to requirements by Gers boss Pedro Caixinha, but Northampton manager Justin Edinburgh was “thrilled” with his signing.
Edinburgh told his club’s official website: “He is a very talented player with a big future ahead of him. He has played at this level and was one of the best players coming out of League Two when he went to Rangers. We feel he has the potential to get even better and believe he is a top signing for us.
“He was outstanding for Scunthorpe last season and played a part in helping them to the play-offs.”
Meanwhile, Caixinha was given further cause for concern ahead of the new season as former Rangers defender Colin Hendry’s son handed the Ibrox side their latest defeat.
Former Blackburn youngster Callum Hendry netted the only goal during a closed-door friendly with St Johnstone at Rangers’ training base.
Rangers fielded a strong team, including summer signings Graham Dorrans and Carlos Pena, who played no part in their shock Europa League defeat to Luxembourg minnows Progres Neiderkorn.
St Johnstone’s official Twitter account revealed Rangers midfielder Niko Kranjcar was “asked to leave the pitch” in the 35th minute after “screaming at the referee”.