Hampton will be taking the helm at Britain's biggest drugmaker at a testing time. GSK was hit last week by a record $489 million fine in China for bribing doctors and has warned on profits in 2014 due to weak sales of its core respiratory drugs.
He will join the board in January, become deputy chairman on April 1 and chairman with effect from Sept. 1, 2015 - or earlier if released from other commitments.
He will leave RBS during 2015 and the bank said the process for selecting his successor was being managed by the board's nominations committee.
A person close to the process had previously said that Hampton was set to be named as GSK's chairman this week.
Reuters reported on Monday that GSK was under pressure to make changes, including a possible early replacement of current Chairman Chris Gent, as a result of its problems, which have undermined investor confidence.
Gent, best-known for leading mobile phone company Vodafone during a period of rapid growth, has chaired GSK for nine years. He was due to retire by the end of 2015 and the drugmaker said it had been planning for his succession over the last two years.
Naming a new chairman may be seen as a sign that change is coming at GSK to address shareholder concerns over both the China affair and the company's recent poor financial performance.
As the new chairman, a key task for Hampton will be to steer the group back to sustainable growth and, in the long term, to find an eventual successor to Chief Executive Andrew Witty, who was appointed by Gent and has been in the job since 2008.
Witty has been viewed as a star manager for much of his six-year tenure but he has been damaged by the China scandal, which forced GSK to make an abject apology to the Chinese people last week.
Investors have become increasingly disillusioned with GSK's management in the past year and the company's shares have lagged badly. While the European healthcare sector has risen by around a fifth this year on optimism over new drugs, GSK shares have lost 11 percent as forecasts for its sales and earnings have fallen.
Hampton has been chairman of RBS since 2009 when he was parachuted in to help rescue the bank following its 45 billion pounds ($74 billion) bailout during the financial crisis.
He has previously said that a chairman should typically serve between five and seven years at a listed company and is expected to stay at RBS until a successor is appointed, according to industry sources.
Hampton has led RBS, which is 80-percent owned by the British government, through a turbulent period of transition during which it shed assets worth 1 trillion pounds to rid itself of toxic loans built up during a period of aggressive lending in the run-up to the financial crisis.
However, the bank's attempts to return to health have been held back by the legacy of past misconduct, which included fines of $612 million for the fixing of benchmark interest rates and accusations over how it treated struggling small firms.
Hampton had hoped to oversee the start of RBS's return to full private ownership but that prospect is still seen to be several years away with its shares trading well below the price the government bought them at, leaving taxpayers sitting on a loss of 13 billion pounds.
Before RBS, Hampton chaired supermarket chain Sainsbury and was previously group finance director at Lloyds TSB, BT Group, BG Group, British Gas and British Steel.