President-elect Donald J. Trump on Wednesday named Gov. Nikki Haley of South Carolina as his choice to become ambassador to the United Nations, adding to his prospective cabinet a former critic with whom he had sparred bitterly.

Ms. Haley’s name had previously been mentioned as a possible contender to become Mr. Trump’s secretary of state, and she met with Trump transition officials last week in New York.

Her selection was first reported by the The Post and Courier newspaper in Charleston, S.C. The news of Ms. Haley’s selection came after days of criticism of Mr. Trump’s early picks as a homogeneous bloc of older, white men. If confirmed, Ms. Haley would step down as governor and be replaced by the state’s lieutenant governor, Henry McMaster, who was an early and vocal supporter of Mr. Trump.

Ms. Haley, 44, supported Senator Marco Rubio of Florida during the Republican primaries, and she was a prominent and frequent critic of Mr. Trump early in his run.