The 20-year-old spent six months on loan at Meadow Lane before returning to his parent club at the beginning of January.
Notts manager Shaun Derry has said that he is pleased to re-sign McGregor after he had attracted interest from fellow League One side Wolverhampton Wanderers.
"It has been a topsy-turvy deal," Derry told BBC Radio Nottingham.
"We have the backing of some real good people up at Celtic who realise just what position he is in in his development. We also realise that we have a very good player on our hands.
"We absolutely love him at Notts County and we will continue to try nurture him into the player we think he can be."
McGregor netted 12 goals in 27 appearances for Notts during his previous loan spell.