The National League table toppers scored three goals in the final 15 minutes through Elliot Lee and Paul Mullin to knock Boro out of the cup and give them their first loss in 12 matches.
The game was a cagey affair in the first half with Wrexham having most of the chances, with Jack Turner producing a wonderful double save from a corner in the 21st minute, the most notable moment in the first half for Wrexham.
Sam Dalby also had a big chance to give Wrexham the lead 10 minutes later when he turned Kevin Lokko and fired his shot just over the bar with Jack Turner left stranded.
Boro edged back into the game in the final 15 minutes of the first half and Jonathon Page had a brilliant chance in the 43rd minute from which he saw his half volley fly just over the top of the bar.
The half ended with Wrexham midfielder Jordan Davies being stretchered off after what looked to be a very serious knee injury that he picked up trying to win the ball back for his side.
HALF-TIME: Wrexham 0 Farnborough 0
The game kicked into gear in the second half, and it wasn’t long after the break before the deadlock was broken. Three minutes after the game restarted Mullin was there at the back post after a poor corner kick was flicked on at the near post for the home striker to tap in. The goal was Mullin’s 50th for Wrexham in all competitions.
It didn’t take long for Boro to respond, as Oliver Pendlebury sent the Boro fans into delirium as he scored a superb free-kick, just like he did in the 3-1 win over Dartford, after Reggie Young was brought down by Lee.
Farnborough very nearly took the lead in the 72nd minute when Selim Saied broke through and nearly rifled a shot into the top corner, but Wrexham goalkeeper Mark Howard was equal to it and denied the winger from giving Boro the lead.
From that point onwards however, Wrexham showed their class and took the lead in the 78th minute through a wonderful Lee strike, bending the ball into the top corner from 25 yards out, leaving Turner no option other than to stand and watch.
Just five minutes after that, Wrexham made it 3-1. Mullin scored his second of the game, tapping in a cross from McFadzean to all but seal the tie for the Welsh side.
Mullin wasn’t done there however, as he scored his hat trick in the 89th minute, a brilliant bicycle kick into the bottom corner to make it 4-1.
Farnborough Captain Kevin Lokko nearly gave Boro a consolation goal in added time, but his header was saved incredibly from Howard to keep the score at 4-1.
FULL-TIME: Wrexham 4 Farnborough 1
It has been an incredible run for Farnborough, but all good things must come to an end and Spencer Day will be hoping his side can bounce back from this defeat and start a new unbeaten run next Saturday, at home to Hampton & Richmond Borough in The National League South.