According to The Hollywood Reporter, the actor will join the hour-long episode, which is due to air on May 19, as another potential candidate to fill the vacant office manager position left by Steve Carell's character Michael Scott.
Carrey joins previously announced guest stars Catherine Tate, Ray Romano and James Spader as well as Will Arnett, all of whom are expected to lobby for the job.
The Office actor and producer Paul Lieberstein previously hinted that Carell's replacement may already have been chosen but is being kept secret in order to maintain suspense.
Actress and writer Mindy Kaling recently revealed the character names chosen for the guest stars.
Meanwhile, Carell's final episode of The Office will air during an extended 50-minute slot on April 28.
The Office airs on Thursdays at 9/8c on NBC.