Summerfield made 34 appearances in League Two last season, but left the Minstermen in May after he turned down a new deal following their relegation.
The 28-year-old joined York in 2014 after two seasons with Shrewsbury.
"I only hear positive things about the club and meeting everyone here has made the decision very easy," he said.
Find all the latest football transfers on our dedicated page.
League Two side Grimsby have signed midfielder Luke Summerfield on a two-year contract following his release by National League club York.