With Olly Kohn in the sin bin for Quins, Danny Care spotted a gap in the Saracens defence and darted over to give Harlequins a 13-9 half time lead.
Nick Evans uncharacteristically missed another attempt to extend the Quins' lead early in the second half, as Farrell struck back to give Saracens a 15-13 advantage.
An illegal infringement at the breakdown saw George Kruis sent to the bin, and Evans this time took full advantage, kicking Harelquins back into the lead.
Nick Evans's faltering afternoon continued as his scooped kick gave Farrell an opportunity to regain the lead, Farrell's pin-point kicking continued to impress as he put Saracens 18-16 ahead.
Quins pushed hard for a late winner, but a knock-on handed possession back to the Saracens, who held out for a surprise victory.