It was a first away win in the competition for 15 years by the Mariners.
They were rewarded for their positive start with a goal after nine minutes. Striker Lenell John-Lewis found room in a crowded box to hit a long angled shot into the bottom far corner of the net.
It came just after a fierce strike from Joe Colbeck had rattled a post.
League Two Scunthorpe, struggling badly for goals in recent games, had plenty of possession.as they tried to get back into the game but again lacked a cutting edge up front.
Their best effort was a 20-yard drive from leading marksman Sam Winnall that had the sting taken out of it by a deflection before keeper James McKeown was able to claim it.
But Scunthorpe came flying out at the start of the second half, equalising in the 46th minute when winger Terry Hawkridge saw his angled low shot from the edge of the six yard box squeeze in at the near post.
Conference side Grimsby, though, responded well and went back in front in the 58th minute when giant centre-back Clayton McDonald out jumped the home defence to power in a header from a free-kick by Scott Kerr.
That proved too much for Scunthorpe who could not force another equaliser as the confident Mariners secured a home tie with Northampton in the next round.