The comedy legend is to play a crafty talent agent named Carla Fenn, who helps Andy Bernard (Ed Helms) try to launch his show business career.
Barr is expected to shoot her scenes on the NBC sitcom throughout this week. She will be taking a hiatus from her Las Vegas stage show in order to fit The Office into her schedule.
It was reported earlier in the week that former Office regulars BJ Novak and Mindy Kaling will also be appearing before the series bows out this spring.
The Office's final episodes apparently will not feature the return of Steve Carell, who recently said that he didn't think it would be the right creative choice for viewers to see Michael Scott again.
NBC airs The Office on Thursdays at 9/8c on NBC. In the UK, the show is broadcast by Comedy Central.