Neither side managed to break the deadlock in a scrappy first half, but 10 minutes after the interval a great through-ball from Shaun Scales found Dan Peel, who slotted the ball past the Edgehill keeper.
A string of outstanding saves from Scalby man of the match Matty Scott maintained their lead as they held on for a superb victory.
Scalby chief Dan Argyle said: “I am absolutely chuffed with the lads’ performance today, they battled for everything and it paid off.
“I am proud to manage this set of lads. Matty was our man of the match for several brilliant saves to keep the lead for us.”
Edgehill boss Steve Clegg said: “It was a scrappy game but they deserved to win as they worked hard and their keeper was man of the match.”
Third division It is It is Rovers join Scalby in the third round after earning a 3-1 home win against Helperby.
Sam Pickard put Rovers in front on 10 minutes with a storming finish and 15 minutes later Luke Jones added a second with a clever chip over the Helperby keeper.
The third goal saw a great free-flowing team move finished off by a neat Ross Kevan finish, and although Helperby pulled a goal back after the interval there were no further alarms as the hosts coasted through.
Man of the match was given to striker Pickard, who led the line superbly for the victors.
Cayton Corinthians suffered a 5-3 home defeat against Dormanstown in their NRCFA tie.
The Cleveland League side took the lead with a 25-yard strike, but Isaac Sands levelled with a header which found the top corner of the net,
The visitors regained the lead 10 minutes before half-time and then made it 4-1 with two further goals after the break.
Cayton man of the match Sands headed in his second to give Cayton hope and then Josh Venner struck 20 minutes from time to pull it back to 4-3, only for Dormanstown to kill the game off with their fifth strike.
An astonishing derby between Sleights and Whitby RUFC saw the Scarborough FA District Cup quarter-final end 5-5 after 90 minutes and the villagers won 3-1 on penalties.
Tom Kilpatrick’s early double gave Sleights the early advantage, but Paul Jobling pulled a goal back for Ste Mothersdale’s side, collecting a pass from Callum Ogden and taking it around home keeper Billy Welford.
Ogden then set up his side’s second, which was finished adeptly by Lewis Peel, but Charlie Smith restored the hosts’ lead before the break.
Peel equalised after fine play from new signing Joe Crowther and Peel completed his hat-trick to put RUFC ahead for the first time, his third a great solo effort.
When Damon Craig lobbed Welford to make it 5-3 it looked like the away team were easing to victory, but Mikey Kilpatrick - Tom’s brother -and Peel missed late chances and a James Fawcett penalty and Smith’s second levelled the scores at 5-5.
In the closing moments Welford pulled off a stunning double save to deny Jobling and the game went to spot-kicks, Welford then making two fine stops to help his side to a 3-1 shoot-out win.
Smith was named as the man of the match for the victors while Mothersdale was delighted with the all-round effort of his side.
He said: “We should have held on for the win but despite the loss on penalties I am chuffed to pieces with the way the lads did today, I think this performance could well be a turning point as we are getting players back in for us now.”
West Pier are also through to the semi-finals as they claimed a 4-0 win at Seamer Sports.
In a keenly-contested all-first division clash, Pier opened the scoring through a 25-yard strike from Martin Cooper and then Will Jenkinson blasted home from 30 yards to make it 2-0 at the break.
A thunderous strike from 35 yards by Chris Nelson after a corner was only half-cleared made sure for Andy Spivey’s side and the same player slotted in late on to round off the win for Pier.
Spivey said: “ I think we did well to win a tough game.Striker Paul Provins who filled in at centre-back impressed, while Andy Sheader did well at left-back, as did midfielders Mikey Pickering and Sam Garnett.”
Kirkbymoorside moved into the quarter-finals with a first round 4-3 win at home to Whitby Fishermen’s Society.
The away side opened the scoring on two minutes through a Mark Swales header but the Moorsiders, who play in the York League, revived to go 3-1 up and despite a second Swales header they added a fourth.
Whitby man of the match Karl Storr scored late on for the visitors, but despite a sustained spell of pressure from Mark Storr’s side they failed to equalise.
Fishburn Park Reserves made a mockery of their position at the foot of Division Three to win 4-2 on penalties after a thrilling Trophy Trader League Trophy clash at home to Scalby Reserves ended 3-3 after extra-time.
After a goalless first half Jon Bateman broke through the Park defence to fire a fine shot home, but the hosts levelled from a Callum Halley penalty.
Kane Brannick then netted to put Park in front, only for the away side to level three minutes from time when Karl Hansell and Tommy Day combined to set up George Wilson.
Fishburn went 3-2 up in extra-time, 16-year-old sub Billy Arnold smashing home from a 45-yard volley and it looked like Carl Oliver’s side were going through.
But once again Scalby refused to submit and two minutes from time keeper Kev Sunderland, who had pushed up for a corner, lobbed over his counterpart Kieran Noble to take the game to penalties.
Halley put Park 1-0 up, then Day had his shot saved by Noble and Rich Fletcher made it 2-0 to Fishburn, Wilson replying for Scalby.
Tom Wardell fired the hosts 3-1 ahead, then Darren Walters skewed his shot wide, leaving Arnold the chance to seal the win but Sunderland saved and then Bateman scored to give Scalby hope.
But this hope was extinguished as Thomas Hawksfield netted to spark the Fishburn celebrations.
Filey Town Reserves moved into the next round of the East Riding FA Junior Country Cup with a 3-2 home win against Burton Agnes.
A 20-yard free-kick from Jack Vernon put Town in front at half-time.
After the break Vernon set up Stu Dickens to make it 2-0, and although the Driffield League side pulled a goal back, Matty Dickens restored Filey’s two-goal advantage.
Burton pulled another goal back but Filey had done enough to secure the win. Keeper Jonny Hunter was the man of the match for the winning team.
Hunmanby United Reserves lost out 3-2 at Pocklington Town 3rds in the same competition.