The 29-year-old has made 18 appearances for Richard Cockerill’s side since joining from Glasgow Warriors in June 2018.
Pyrgos, who has captained Edinburgh on several occasions in Stuart McInally’s absence, said: “I’ve thoroughly enjoyed my first season at Edinburgh and I’m excited to sign for two more years.
“I really believe we have the ability to go and achieve success over the next few seasons. I’m looking forward to working hard to make that happen.”
Cockerill added: “Henry is a level headed, gutsy player whose leadership and playmaking abilities are integral to the way we play.
“He offers a great link between our forward pack and backline, so we’re delighted that he will continue to represent this club for the next two seasons.”
Pyrgos made his debut for Edinburgh against Ospreys in the 2018/19 Guinness PRO14 curtain-raiser. He won the competition in its previous guise as the PRO12 in 2012 with Glasgow, and scored his first try for Edinburgh in the Heineken Champions Cup win over Toulon at BT Murrayfield.
The Dorset-born half-back made his Scotland debut against New Zealand in the 2012 Autumn Test Series, scoring his first try against South Africa in the same campaign and has since played 27 matches for the national team, contributing 29 points.