The 20-year-old helped the Shots win the Conference title last season, but will miss their return to the Football League after deciding to take up the Railwaymen's offer.
Aldershot chairman, John McGinty, said: "This is a fantastic deal for the club and for Joel Grant.
"We could not stand in his way as it is a great opportunity for him. Joel travelled back from holiday in Jamaica especially just to sign the deal.
"We wish Joel every success in his career and thank him for the service that he gave the club."
Grant scored 11 goals in 58 appearances for the Shots, having started his career as a trainee with Watford.