McDermott saved Quins from the drop after joining in 2006.
Harlequins head coach Brian McDermott is to leave the club at the end of the season to rejoin Leeds Rhinos as assistant to Brian McClennan.
The former Great Britain forward has spent four years in charge of the London club.
McDermott said: "I've really enjoyed my four years at Harlequins but I feel now is time to hand over the reins.
"I want to spend more time with my family, who live in Yorkshire, and this opportunity is very exciting."
McDermott was previously assistant to former Leeds coach Tony Smith before he joined Harlequins in 2006, and will replace Francis Cummins and Willie Poching, who are leaving Headingley at the end of the season.
He would also be a candidate to succeed McClennan if the New Zealander leaves at the end of his contract in 12 months' time.
Leeds chief executive Gary Hetherington added: "We are delighted to have secured Brian as he is an outstanding coach.
"It has been good to see his progression as a coach in London and we are excited to have him back on board."
McDermott's final game in charge of Quins will be against Warrington Wolves on Friday, 3 September.