On the "Office Ladies" podcast, it’s explained that, in order to film the scene, they needed to hire an animal training company who gave them a "special koi wrangler." Jenna Fischer breaks down the final bill, saying, "The total cost for the fish, the holding tanks, the pumps, the filters, and all the labor was $12,000."
The podcast also reveals that the incident is inspired by a mishap that happened to the episode's writers, Warren Lieberstein and Halsted Sullivan. When Lieberstein went to throw out his gum before a meeting, he lost his balance and toppled backward into a koi pond.
In the original story concept, which the writers discarded for being too disturbing, the fish was going to cost $2,000 to replace. Michael was going to buy the fish, bring it back to the office and cook it in the toaster oven and then chicken out at the last minute and throw the poor creature away.