Buchanan, 25, came through the Quins academy set-up to make his debut against Leicester in 2010, and has since made 116 appearances.
He toured Argentina with England in 2013, but did not play a Test match.
"Rob has made significant strides this season in nailing down the starting hooker position," director of rugby John Kingston said.
"His love of the club is there for all to see and he will play a significant role in the quest for more silverware over the coming years."
The front-rower joins Charlie Mulchrone, Ross Chisholm and Dave Ward in agreeing extended deals with the club.
Quins' academy side has brought through a strong contingent of first-team and international players, with Buchanan, recent England and British & Irish Lions call-up Kyle Sinckler, George Lowe and Joe Marchant all adding depth to the squad.
"I have been with this club since I was 16 and it was an easy decision to extend my time," Buchanan said.
"To be able to work under the guidance of Adam Jones and Graham Rowntree for the coming seasons is incredibly exciting for me, and I am grateful to John Kingston for the opportunity to continue my career here at Harlequins."

The 32-year-old, formerly with Watford and Cardiff, has agreed a deal until May 2018.
Cowie played with Ross County and Inverness Caledonian Thistle and has 10 international caps.
"He'll bring experience to the table, which is invaluable when you're trying to blood younger players into the first team," said Hearts boss Robbie Neilson.
Speaking to the club website, Neilson added: "He's played in the Scottish top flight before so knows our game, and he's played at the highest level down south and won a Championship, so I know he's a winner.
"Having played in England, he'll show the players here the level they'll have to get to if they have aspirations to play there themselves."
Cowie has made more than 450 senior club appearances, scoring 52 times.

The RSPB said a male hen harrier vanished from a Forest of Bowland nest three weeks ago, with males at two others not seen for a week.
Male hen harriers disappearing while part of an active nesting attempt is "exceptionally unusual", the charity added. Police are investigating.
The reward is for any information which leads to a successful conviction.
The hen harrier is listed as a red status species, meaning that it is threatened and that populations have suffered a severe decline in numbers.
In the absence of males to hunt for food, females at two of the nests were forced to abandon their eggs, the charity said.
Last year there were only two breeding pairs in the Forest of Bowland.
Martin Harper, from the RSPB, said: "Hen harriers are hanging on by a thread in England and the disappearances of the past few weeks have made a desperate situation even worse.
"We don't know what has happened to these three birds, but we will find out and we will save our hen harriers. This is an awful setback, but it will not stop us."
Source: BBC Nature
Hooker Rob Buchanan has extended his contract with Harlequins, although terms are undisclosed.
[NEXT_CONCEPT]
Scotland midfielder Don Cowie has signed for Hearts following his release from Wigan.
[NEXT_CONCEPT]
A £10,000 reward has been offered after three rare birds of prey disappeared in Lancashire.