WASHINGTON — The American ambassador whose abrupt recall from Ukraine helped lead to President Trump’s impeachment has retired from the State Department, a person familiar with her plans confirmed on Friday.

Marie L. Yovanovitch, a career diplomat, had been expected to leave the Foreign Service after she was ordered back to Washington from Kyiv, Ukraine, ahead of schedule last spring, accused of being disloyal to Mr. Trump.

But documents and testimony later showed that she was the target of a smear campaign for, in part, refusing to grant visas to former Ukrainian officials who were investigating Mr. Trump’s political rivals.

On a July 25 telephone call with President Volodymyr Zelensky of Ukraine, Mr. Trump described Ms. Yovanovitch as “bad news” and said, ominously, “She’s going to go through some things.”