Colbert, 48, will appear in the NBC comedy's Halloween episode as Broccoli Rob, a former member of Andy's a cappella group Here Comes Treble.
The rivalry between Andy (Ed Helms) and Broccoli Rob heats up when Andy learns that Rob is spreading different stories about the group and causing some drama. The Halloween episode is set to air on Oct. 25.
Colbert and Helms worked together at The Daily Show alongside former Office star Steve Carell. The show has previously paid host to other Daily Show alums, including Rob Riggle, Larry Wilmore and Carell's wife, Nancy Carell.
The Office's final season kicks off Thursday at 9/8c on NBC.