He has been credited with leading the bank's operations in America back into profit following the global financial crisis.
Insiders said Mr McDonagh made the decision to depart after coming to the conclusion he would never become HSBC's chief executive, reports the Financial Times.
Michael Geoghegan, HSBC's current group chief executive, said: "[He] has been instrumental in leading our business there through particularly challenging times in addition to the continued growth in our core businesses."
Mr McDonagh, who has worked in the US for the bank since 2002, is said to have told Mr Geoghegan of his planned resignation a few weeks ago, but is to stay on his post until the end of July.
In April, HSBC announced it was seeking to hire 100 new international managers for its operations around the world.
By Gary Cooper