Deschanel, who plays a teacher named Jess on the series, made the revelation while appearing on "CONAN".
"I'm not sure exactly how the celebrities were chosen, but someone was friends with some of the Kardashians and had made a phone call, and they had kindly come on to shoot a little cameo part where they were at Prince's party, which I didn't really know about because it kept changing," Deschanel said.
To avoid the nightmare, a production assistant had to burn the scripts and everything that might mention the Kardashian's name.
"I get there the day Prince is supposed to arrive, and I'm studying my lines, and one of the P.A.S comes in, and she says, 'I need all of the scripts.' She takes mine from me and takes everybody else's, and she takes everyone's call sheets ... I'm like, 'What is going on?' I walk outside, and she has, like, a bonfire. She's burning all the scripts and the call sheets," the 36-year-old actress recalled.
Prince appeared in an episode of "New Girl" season 3 aptly titled "Prince".
In a video that surfaced following his death, the singer was also seen kicking Kim Kardashian off of his concert stage.