The US X Factor judge, who recently returned from a life-changing trip to Africa, explained how show creator Ryan Murphy was keen to have her on board for the brand new season.
Speaking earlier today (3 September) on Live with Kelly and Michael, Demi explained: "The day before I left for Africa I had the day off and I was going to pack and get all my errands done, and then my manager called and said [Ryan] Murphy wants to meet with you.
"It was so close because had I left one day after I wouldn't have gotten to meet Ryan, and they started shooting two days after I got back.
"So while I was in Africa, contracts were signed and deals were done, and then I land and I go straight to work."
Demi's new role will see her embroiled in a lesbian storyline as she plays the love interest of Santana, who is acted by Naya Rivera. 'Heart Attack' singer Demi added: "It was awesome. I've met Ryan before, he's amazing and the cast is amazing.
"I've been friends with some of the cast members for a long time now, so it's pretty awesome to get to work with my friends."
It was announced on 22 August that Demi would be joining the cast for season five, and it seemed no one was as pleased as Lea Michele.
Lea, who has been an original on the show since it started in 2009, tweeted: "Such amazing news that two of my very best friends are going to be on #Glee this year! @ddlovato & @PhoebeStrole! Thank you @MrRPMurphy!"
Last week, Naya shared the first on-set photo of Demi in action. In the snap, Demi and Naya are dressed up in red cheerleading outfits. Naya simply captioned the photo: "Fancy. ddlovato #goodside #dantana?"
Glee will return for its fifth season in the US on 26 September with a two-part Beatles special, followed by a tribute to the late Cory Monteith.
Watch the trailer for season five below: