The hosts were guilty of missing far too many opportunities and failing defensively, which allowed a workmanlike Marine to edge home.
Boro's FA Cup dream began to fade badly in the opening minutes of the match, as a clearly up for it Marine took the lead after just six minutes.
Kenny Strickland whipped a delightful free-kick into the Boro near post and Danny Mitchley stooped to head it home.
Dave Merris had to put his body on the line to make sure the lead wasn't doubled almost immediately, when he managed to balloon Josh Hine's effort over from all of a yard.
Boro began to creep their way back into the game, with Will Annan, Kev Burgess and Wayne Brooksby all worrying the visiting keeper.
But, just as they were pressing the issue, Boro committed defensive suicide and allowed Marine in for a second.
Burgess' header back to Tommy Taylor was far too weak and Dom Reid had the presence of mind to loop the ball over the stranded keeper and into the net.
Boro again took things on, though they were left with the constant concern of the Marine counter, which threatened to add more goals to the visitors' tally.
But, with just a few minutes of the half remaining, things lightened a touch when Boro trimmed the lead back to one.
Annan's corner drifted through a glut of players and was superbly met by Walshaw, who rolled home from five yards.
Boro forced their rivals back onto the ropes after this, peppering the penalty area and Martin Fearon's goal with unyielding pressure.
Chances came and went as the kitchen sink was thrown, but Marine somehow managed to hang onto the slightest of cushions.
And just as Boro looked to be turning the screw, their opponents hit them right where it hurts on the hour.
With the hosts pushing on, Craig Carney struck on the counter by dancing through a couple of challenges and drilling into the top corner past Taylor's despairing drive.
This completely took the wind out of the Boro sails and it took some time for Steve Kittrick's men to gather the momentum required to haul their way back into the tie.
It was Walshaw again who throw them the lifeline with 10 minutes remaining. The striker heading home at the second attempt after another good Fearon save.
The last big push was required and Boro tried, but Marine had just enough to guide them over the winning line and into the next round.