CBS Television Studios is near a deal for a miniseries based on former FBI Director James Comey's memoir "A Higher Loyalty: Truth, Lies, and Leadership," according to Deadline Hollywood.

The online news site said CBS won an auction and is in final talks for rights to the New York Times bestselling book. It said Comey was involved in pitch meetings in Los Angeles with potential buyers of the project.

CNBC reached out to Macmillan, the memoir's publisher, for comment. CBS Television Studios declined comment for this story.

Comey served as director of the FBI from 2013 until May 2017, when he was abruptly fired by President Donald Trump. Among other things, Comey helped oversee the Hillary Clinton email investigation as well as a probe into alleged ties between the Trump campaign and Russia. Comey had been appointed to the FBI post by President Barack Obama.

Prior to running the FBI, Comey had been U.S. Attorney for the Southern District of New York and known for prosecuting organized crime, terrorism and insider trading cases. He also served as U.S. deputy attorney general in the administration of President George W. Bush.

The adaptation for the production is expected to be written by Billy Ray, an Academy Award-nominated screenwriter for the 2013 film "Captain Phillips." It is expected to be executive produced by Alex Kurtzman, Ray, Shane Salerno and Heather Kadin.

A source familiar with the project told CNBC the auction process for the rights was "a highly competitive situation."

Deadline said the Comey deal was made by talent agency CAA, which held meetings with interested production companies earlier this month. CAA didn't immediately respond to a request for comment from CNBC.

Read more about the project on Deadline.com