Washington (CNN) President Donald Trump's decision to abruptly withdraw a Treasury Department nomination for Jessie Liu, the former US attorney who headed the office that oversaw Roger Stone's prosecution, was directly tied to her former job, CNN has learned.

While head of the US Attorney's Office in Washington, Liu inherited many of the major ongoing cases from Robert Mueller's special counsel investigation and was also handling the politically charged case of former FBI Deputy Director Andrew McCabe, a frequent target of Trump's ire who is also a CNN contributor.

As Trump and administration officials weighed pulling Liu's nomination to serve as the Treasury Department's under secretary for terrorism and financial crimes, a central factor in the talks was how she had run the US Attorney's Office. The problem wasn't that she necessarily did anything wrong, one person familiar with the thinking said, but that she didn't do more to get involved in those cases.

Initially it wasn't clear that Liu's nomination was pulled due to the handling of the politically sensitive cases, but CNN has now confirmed it was. Trump made the final decision to pull the nomination two days before her scheduled confirmation hearing.

Liu stepped down from her job before she was confirmed to the Treasury position, an unusual move. That office is now run by Tim Shea, a close adviser to Attorney General Bill Barr.

Read More