LYNN progressed to the quarter-finals thanks to Dave Puttnam's last-gasp extra time goal - his first for four months.
The winger's scorching 25 yard free kick spared Linnets the agony of another penalty shootout. Lynn will probably go on to meet Burton in the last eight.
With just over a minute left on the clock, the sides needed a camel after being deadlocked on a sand-covered pitch, and everyone was ready for Lynn's third successive shootout in this cup. But Gingerbreads sub Adrian Speed was sent off for a professional foul on Shaun Keeble and Puttnam's effort took a deflection past keeper Mario Ziccardi into the bottom corner.
Puttnam last scored at Salisbury on September 11.
Linnets manager Gary Mills said: "I'm delighted. It did look as though it was going to penalties and I was ready to take the first one myself, but I'm glad Dave put me out of my misery.
"Their keeper's had an outstanding game, but he should not have been on the field. Rules are rules, and the referee didn't keep to them. I was saying on the bench that he could end up being a penalty hero."
Mills was referring to the 22nd minute, when Ziccardi was lucky to be on the pitch after upending Keeble outside the box after a great Emeka Nwadike flick-on put him through. But referee Beeby elected to just book Ziccardi.
After a minute's silence before the game for fan Mick Chilvers, who unfortunately died at the ground last week, Tony Marsden nearly scored with a cracker from the left edge of the area. But Ziccardi tipped it round the post.
Midway into the half, Dave Robinson headed a corner goalwards, which prompted a frantic goalmouth scramble as Nwadike, lying on the floor, could not hook the ball in past a sea of bodies.
Ten minutes later Chuck Martini pulled off double world-class saves, first from Brendon McDaid, who when he was at Lincoln Utd Mills bid for. Then Martini somehow got across and denied Darren Gwyther at point-blank range.
Just before the break, Puttnam's volley on the turn was blocked and Nwadike blazed over the follow-up.
On the hour mark, Robinson looked certain to score as he flicked on Mark Harbottle's free-kick, but as the ball went past him Ziccardi stuck out his foot at the last second and deflected it away.
Then Jon Palmer beat two defenders in the box, but scuffed his shot woefully wide.
With normal time running out, Martini seemed to get a finger-tip on to Gwyther's header which hit the post and Glen Fuff cleared off the line.
In the second period of extra time Robinson shrugged off two forwards and sent a pinpoint long ball to Keeble, who fired over when well-placed.
Lynn: Martini, Dakin, Spearing, Robinson. Fuff, Nwadike (Mills 87), Harbottle, Marsden, Keeble, Palmer Puttnam. Subs (not used) Turner, Rowland.
Grantham: Ziccardi, Barker (Simmons 96), Neil (Kirby 66), McDaid, Wrighjt (Speed 64), Carvell, Wilkes, Stahlberger, Ranshaw, Gwyther, White.