It means he will serve one year more than the five he had committed to, but will still be two short of the usual eight years governors serve.
Mr Carney said the move “recognised the importance to the country of continuity” during Brexit negotiations.
He also said he had taken the decision because he recognised “the importance to the country of continuity during the UK’s Article 50 negotiations”.
“I clearly signalled my intention to serve for five years. As testified to Parliament, that intention was driven by personal, family considerations,” he wrote to Mr Hammond.
“In addition, I believed that five years would allow a reasonable timeframe to remodel the Bank to reflect its new, much broader responsibilities, and to complete the most important elements of the domestic financial reform agenda.”
He added: “Since then, my personal circumstances have not changed but other circumstances clearly have, most notably the UK’s decision to leave the European Union.”
The pound held steady against the US dollar and the euro immediately after the announcement, with sterling up 0.3 per cent against the US dollar at 1.223 and 0.2 per cent against the euro at 1.114.
Mr Carney had faced mounting speculation that he was preparing to stand down early amid complaints he went too far in warning of the economic dangers of leaving the EU in order to bolster Remain during the referendum campaign.
When he took up the post in 2013, it was agreed that Mr Carney would serve an initial five-year term with the option of another three years.
Responding to the governor’s letter, Mr Hammond said he was “very pleased” that Mr Carney had taken the decision to serve until the end of June 2019.
“This will enable you to continue your highly-effective leadership of the Bank through a critical period for the British economy as we negotiate our exit from the European Union,” he added.
“I am grateful for your contribution to both monetary and financial stability to date, and I look forward to your continuing contribution in the future.”
Mr Carney had met with Mrs May at 10 Downing Street earlier in the day as speculation mounted over the governor’s future.
Asked before the announcement whether Mrs May wanted him to stay on, the PM’s official spokeswoman told a regular Westminster news briefing: “The Prime Minister has been clear in her support for the governor and the work he is doing for the country.
“It is clearly a decision for him but the PM would certainly be supportive of him going on beyond his five years.”
Pressed on whether Mrs May saw the governor as “the right man for the job”, the spokeswoman replied: “Absolutely.”
Leading pro-Brexit Tory MEP Daniel Hannan warned that if Mr Carney remains in his post he must stop acting like a “rock star”.