Mr Staley currently works for US hedge fund Blue Mountain Capital Management and will take over on 1 December.
Barclays' previous chief executive, Antony Jenkins, was fired in July after falling out with board members.
The appointment of Mr Staley is seen as answering investor criticism that the bank was losing its focus on investment banking.
Mr Staley will be paid £1.2m in salary, £396,000 in pension contributions and as much as £5.5m a year in bonuses, which will mostly be paid in shares. He will also receive £1.15m in shares per year that he will have to keep for five years before cashing in. That is a total of £8.2m for the year, if he is awarded the maximum bonus.
He will also receive shares in Barclays worth about £1.93m to replace shares in JPMorgan he will lose for leaving his former employer.
In a letter to staff, Mr Staley indicated he would focus on areas of investment banking that did not require as much capital - the buffer of reserves it keeps to protect it from unexpected losses. Analysts said this could include such areas as merger advice and trading in stocks.
In common with Bob Diamond, the last investment banker to run Barclays, Mr Staley sees Africa as an important market for the bank.
In his letter, he said: "Our business in Africa gives us exciting opportunities in fast growing economies. We will complete the necessary transformation and repositioning of the Investment Bank to a less capital intensive model. And we will support the growth of our world leading payments business in Barclaycard."
Announcing Mr Staley's appointment, Barclays chairman John McFarlane said: "[Jes Staley] understands corporate and investment banking well, the re-positioning of which is one of our major priorities.
"In Jes Staley we believe we have an executive with the appropriate leadership talent and wide-ranging experience to deliver shareholder value and to take the Group forward strategically."
James Staley, 59, is a former chief executive of JP Morgan Chase's investment bank. He spent more than 30 years of his career there before joining hedge fund BlueMountain Capital Management in 2013.
A longstanding lieutenant of JP Morgan chief executive Jamie Dimon, Mr Staley was at one point thought to be in line to take over as chief executive of the US bank.
Three years ago, US business news broadcaster CNBC reported that Mr Staley was, in fact, a finalist for the top job at Barclays in August 2012, - alongside his colleague Bill Winters. Both eventually lost out to insider Antony Jenkins.
In 2015, Mr Staley was elected to the board of Swiss bank UBS to serve on the bank's risk committee.
Barclays has confirmed that former JP Morgan banker James "Jes" Staley will be its new chief executive.