Production on the film, which is directed by Matthew Vaughn, is finished but McKellen will enter the sound booth to provide the narration for the film that is to be released July 27, Zap2it.com reported Tuesday.
"Stardust" features a star-studded cast that includes Claire Danes, Robert DeNiro, Michelle Pfeiffer and Charlie Cox.
The story centers on a man who is questing to retrieve a fallen star and meets witches, gnomes, goblins and all sorts of creatures along the way.
McKellen has previously worked on "Gods and Monsters," "The Lord of the Rings: The Fellowship of the Ring," "The Da Vinci Code" and "X-Men: The Last Stand."
Disney's 'Jessie' to feature network's first engagement
Iranian woman stops the execution of son's killer