WASHINGTON—World Bank President Jim Yong Kim unexpectedly announced his resignation on Monday, setting up a potential dispute between the U.S. and other member countries over selecting the next leader of the world’s largest development-finance institution.

Mr. Kim plans to leave the bank on Feb. 1, nearly three years before his term was set to expire, to join a firm focused on infrastructure investments.

He...