Lucasfilm President Kathleen Kennedy made the announcement Saturday at Star Wars Celebration Europe II, a fan gathering in Messe Essen, Germany, Entertainment Weekly reported.
"I'm waiting anxiously -- like the audience around the world -- to find out what the surprises are, and discover what my continued role is going to be," Williams, 81, said, adding he knows none of the story details for the movie.
Williams has been nominated for 48 Academy Awards, and has won five, for "Fiddler on the Roof," "Jaws," "Star Wars," "E.T. The Extra-Terrestrial," and "Schindler's List."
It had not been clear whether Williams would be brought back for the upcoming "Star Wars" film, as producer J.J. Abrams, 47, has a favorite Oscar-winning composer in Michael Giacchino.
Giacchino's film credits in collaboration with Abrams include the "Star Trek" reboots, "Mission: Impossible -- Ghost Protocol" and "Super 8."
He won an Academy Award for Pixar's "Up" was was nominated for an Oscar for the Pixar film, "Ratatouille."
He also with Abrams on the TV series "Alias" and "Lost."
The Hollywood Reporter said the new "Star Wars" script will be written by Michael Arndt ("Toy Story 3," "Little Miss Sunshine") and is set to open in 2015.