Ferrell, according to Variety, will take part in a multi-episode story arc prior to Steve Carell's departure from the Emmy-winning series.
Ferrell will portray a branch manager from the home office who "shares some of the inappropriate traits of Carell's Michael Scott," according to the industry paper.
Ferrell and Carell were previously seen on screen in the motion picture "The Anchorman."
"The Office" airs Thursday nights at 9 PM ET on NBC; check local listings.