His resignation will take effect from 1 February.
Mr Kim, 59, was not due to leave until 2022 after he was re-elected for a second five-year term in 2017.
He will "join a firm and focus on increasing infrastructure investments in developing countries", the World Bank said.
"It has been a great honour to serve as President of this remarkable institution, full of passionate individuals dedicated to the mission of ending extreme poverty in our lifetime," Mr Kim said in a statement.
No reason was given for his unexpected resignation.