CNN legal expert Ryan Goodman warned on Wednesday that President Donald Trump's Department of Justice has an "appearance of impropriety" regarding its plans to indict former FBI Director James Comey, and that could come back to haunt the department should it continue to pursue charges.

MSNBC reported on Wednesday that the Trump administration plans to indict Comey for lying to Congress in the coming days, citing "sources familiar with the matter." The report follows the administration's moves to install Trump loyalist Lindsey Halligan as the U.S. Attorney for the Eastern District of Virginia, which would have jurisdiction of Comey's case.

Halligan was installed last Friday after former U.S. Attorney Erik Siebert, a Trump appointee, was pressured to resign.

"This looks like selective prosecution, and that is a significant factor that the Department of Justice should take into account to actually not charge the case," Goodman said during an interview on CNN's "Erin Burnett Out Front."

"That's what the Department of Justice did with Eric Adams," Goodman continued. "Emil Bove, who was the second in command at the time, said internally to the Department of Justice that the reason to drop the charges against Eric Adams is because, 'The timing of the charges and the more recent public actions by the former U.S. attorney responsible for initiating the case have threatened the integrity of the proceedings, including increasing prejudicial pretrial publicity.'"

Trump has recently called for Comey to be indicted in social media posts.

"President Trump's statements are that; that is the appearance of impropriety," he continued. "It's the reason that they even said that there was a reason to withdraw charges against somebody who had already been indicted."