The 26-year-old star said it is a dream come true for her to play the role of Peter Pan, reported CNN online.
"I have wanted to play Peter Pan since I was about three years old, so this is a dream come true," Williams said in a statement.
"It's such an honor to be a part of this adventure, and I'm very excited to get to work with this extraordinarily talented team. And besides, what could go wrong in a live televised production with simultaneous flying, sword fighting and singing?" she added.
"She will reinvent the iconic role of Peter Pan with her wit, her warmth, her dynamic flying and her wonderful musical abilities," the producers said in a statement.
Starring alongside Williams will be Christopher Walken, who has been cast as Captain Hook. 'Peter Pan Live!' airs on NBC on December 4.