The ex-Financial Services Authority (FSA) boss joined Barclays 10 months ago as head of compliance and government and regulatory relations.
But he went on leave last month suffering from stress and exhaustion, and has since decided to leave as he would not be able to return to work in the near term.
He will be replaced by Allen Meyer on an interim basis. Meyer had held another senior compliance role, reporting to Sir Hector.
The bank will now begin the search for a replacement – a task made harder by moves by several major banks to hire more experienced compliance staff.
RBS this year hired former FSA managing director Jon Pain to head up its compliance functions.
Similarly Standard Chartered hired Jean Moorhouse from the Bank of England’s prudential regulation authority this year.
HSBC had fully reformed its regulatory and compliance functions and is in the process of hiring 3,000 more staff.
It has also taken on big names including Serious Organised Crime Agency boss Bill Hughes.
Meanwhile Barclays’ chief operations and technology officer Shaygan Kheradpir also quit the bank to move to head US technology firm Juniper.
Chief information officer Darryl West will take the role on an interim basis.