The Better With You actor will star in the NBC comedy's ninth season as a new staff member at Dunder Mifflin, TV Line reports.
Lacy was due to play Jimmy in Fox's The Goodwin Games after starring in the pilot, but the role was recast with TJ Miller when the show was picked up to series.
He joins Clark Duke on The Office, who signed on to the show as a new regular earlier this month.
The Office will undergo a mini-reboot for its upcoming season, including the departure of showrunner Paul Lieberstein and the possible exit of Rainn Wilson due to his spinoff.
Meanwhile, BJ Novak (Ryan) and Mindy Kaling (Kelly) will not be returning full-time to The Office, which launches its ninth season on September 20.