EW.com reports the Scottish actor is negotiating with Sony Pictures to play an aide to the pope in the film "Angels and Demons," which will serve as a prequel to the popular 2006 film.
"Demons," like "Code," is based on a book by author Dan Brown and follows the adventures of Professor Robert Langdon as he attempts to uncover historical conspiracies and secrets.
EW.com said McGregor would play the pope's aide, Camerlengo Carlo Ventresca, who helps Langdon in his investigative efforts.
Director Ron Howard has already signed on to direct "Angels," which is tentatively scheduled for a May 2009 release.
Filming is expected to begin in June with the cast working from a screen adaptation from writer Akiva Goldsman.