Europe’s biggest bank revealed last year it was considering whether to move elsewhere over concerns about stricter regulations.
Chairman Douglas Flint said the decision to keep the London HQ “offered the best outcome for our customers and shareholders”.
The announcement comes after Chancellor George Osborne made a series of concessions to the City in recent months.
HSBC chief executive Stuart Gulliver said: “Having our headquarters in the UK and our significant business in Asia Pacific delivers the best of both worlds to our stakeholders.”
A Treasury spokeswoman said: “We welcome HSBC’s decision. They’ve looked carefully and dispassionately at the facts and confirmed that the UK is the best place to base a global business.
“It’s a vote of confidence in the government’s economic plan, and a boost to our goal of making the UK a great place to do more business with China and the rest of Asia.”
HSBC said the board’s decision to keep its headquarters in London was “unanimous”.
In its later stages, the review was “narrowed” to the UK and Hong Kong, “both of which are considered by the board to be world-class financial centres”, it added.
In a statement, the bank said: “The UK is an important and globally connected economy. It has an internationally respected regulatory framework and legal system, and immense experience in handling complex international affairs.
“London is one of the world’s leading international financial centres and home to a large pool of highly skilled, international talent. It remains therefore ideally positioned to be the home base for a global financial institution such as HSBC.”
Flint said maintaining the bank’s hub in London was “not only compatible, but offered the best outcome for our customers and shareholders”.
HSBC’s review was announced in April last year at the bank’s annual meeting.
It cited increasingly onerous British regulatory conditions and the UK bank levy introduced in 2010 – a tax based on the size of any British-based banks’ global balance sheet.
HSBC, which has 48,000 of its 257,000 staff in the UK, said the levy cost it $1.1 billion (£720 million) in 2014.
During its review, the bank reportedly looked at bases in Hong Kong, Singapore, the US and Frankfurt.
But since then, Osborne said in last July’s Budget that he would gradually reduce the bank levy over the coming years.
He has also called for a “new settlement” to end banker bashing and was widely reported to have ousted tough-minded Martin Wheatley, head of City watchdog the Financial Conduct Authority (FCA) in July, raising concerns about political influence at the regulator.
The decision to stay in London comes ahead of HSBC’s annual results on 22 February.
The bank said it will no longer review the location of its headquarters every three years, and will only revisit the matter if there is a “material change in circumstances.”
Carolyn Fairbairn, director-general of Confederation of British Industry (CBI), said: “Strong banks which can provide the finance businesses need to grow are critical for the British economy. And we want to have truly global companies, major employers like HSBC, headquartered here so this announcement is good news.
“HSBC’s thorough review and consideration of other international financial centres emphasises the need for the UK to continuously stay competitive on regulation, tax and talent.”