The 39-year-old, formerly a director of rugby with London Irish who has also worked for England’s Rugby Football Union, is something of a surprise choice.
He has been out of the sport for the past 18 months, working for the English Institute of Sport.
Dean Richards resigned from the post in August as details emerged of his role in the ‘Bloodgate’ scandal.
Quins also considered former Wasps and Lions coach Ian McGeechan, former Scotland coach Frank Hadden, South Africa assistant coach Gary Gold and Quins assistant coach Tony Diprose.
But they have opted for the former Ireland full-back, who is a highly respected figure in the game despite his recent absence.
O’Shea retired as a player in 2000 before joining the coaching staff at London Irish.
He led London Irish to the Powergen Cup in 2002 and then took up a role with the RFU as director of regional academies before joining the EIS in 2008.
Richards and Harlequins physio Steph Brennan were initially cleared of any wrongdoing over ‘Bloodgate’ at a disciplinary hearing in July but were heavily punished by a subsequent appeals committee in August.
Former England number eight Richards was banned from coaching worldwide and Harlequins chief executive Mark Evans initially said the club were undecided as to whether they would replace him.