On June 9, 2012, the Athletics claimed Farquhar off waivers from the Blue Jays. After making five appearances in the minor leagues for Sacramento, the Athletics waived him to select the contract of A. J. Griffin.
On July 23, 2012, the Yankees traded Farquhar and pitcher D. J. Mitchell to the Seattle Mariners for right fielder Ichiro Suzuki. Farquhar started the 2013 season with the Tacoma Rainiers of the PCL. The Mariners purchased his contract, promoting him to the major leagues, on May 17. On August 2, Farquhar replaced Tom Wilhelmsen as closer, and he recorded his first major league save on August 3 against Baltimore. From that point to the end of the season, he went 0-3 with 16 saves in 24 games, striking out 29 in innings with a 2.38 ERA. Overall on the year, he went 0–3 with a 4.20 ERA in 46 appearances, striking out 79 in innings.
Tampa Bay Rays
On November 5, 2015, the Mariners traded Farquhar, Brad Miller, and Logan Morrison to the Tampa Bay Rays for Nate Karns, C. J. Riefenhauser, and Boog Powell. On April 23, 2016, Farquhar was sent down to the Durham Bulls of the Class AAA International League. He was recalled on May 14, but was designated for assignment the next day, and was back with Durham on the 16th. On June 25, Farquhar was sent back up to the Rays, on the 26th, one day later, he was sent back down to Durham, on the 27th, he was called back up to the Rays. This time Farquhar made it 8 days before his July 5 demotion back to Durham. On August 6, Farquhar was called back up to the Rays, this was his final transaction of the season. He finished the season with a 3.06 ERA in 35 games and 46 strikeouts. Farquhar was designated for assignment on June 29, 2017. He cleared waivers and was assigned to Durham. The Rays released him on July 20.
Chicago White Sox
On July 24, 2017, Farquhar signed a minor league contract with the Chicago White Sox. His contract was purchased by the White Sox on August 19, 2017.
On April 20, 2018, after pitching in relief in the sixth inning in a game against the Houston Astros, Farquhar collapsed in the dugout. Witnesses saw him go into the White Sox's dugout and vomit before losing consciousness. Farquhar was carried out by ambulance and taken to Rush University Medical Center. Teammates said they were shocked because they did not "notice any signs that Farquhar might have been sick". After further testing, doctors revealed Farquhar suffered from a brain hemorrhage, which was caused from a ruptured brain aneurysm. On May 7, 2018, Farquhar was discharged from the hospital. Despite being ruled out for the rest of the 2018 season, Demetrius Klee Lopes and other doctors expected him to make a full recovery and pitch again. On June 1, 2018, he had recovered enough to throw the ceremonial first pitch for the White Sox's game against the Milwaukee Brewers. Farquhar elected free agency following the 2018 season.
Return to the Yankees organization
On January 21, 2019, Farquhar signed a minor league contract with the Yankees. He was released on June 19, 2019. On August 1, on his personal Instagram account, he announced his retirement.
Coaching career
Farquhar was announced as pitching coach of the Winston-Salem Dash, the Class-A Advanced affiliate of the Chicago White Sox, for the 2020 season.
Personal life
Farquhar is married to his high school sweetheart, Alexandria Castells Farquhar, and they have one daughter and two sons. Off the field, Farquhar enjoys the game of golf. He has said that he would like to coach and teach math at the high school level one day.