Here is the offical story
Robin Williams provided the voice for the Genie, at union scale rate (the lowest legal pay rate a studio can give an actor), on the provisos that his voice was not used for merchandising (i.e. toys and such) and that the Genie character not take up more than 25% of the space of a poster, ad, billboard, or trailer. When these wishes were not granted, he withdrew his support for Disney and the film. As a result, his name was not included in "The Art of Aladdin" book (it makes constant references to "the voice of the Genie"), and he was not available for the direct-to-video sequel The Return of Jafar (1994) (V) or the "Aladdin" (1994) TV show (Dan Castellaneta filled in as the voice of the Genie for these productions). In an attempt to get back on good terms with Robin Williams, Walt Disney Co. CEO 'Michael Eisner' apologized to Robin Williams with a peace offering of an original Pablo Picasso painting. Still angered and betrayed by Disney, Robin Williams would not accept the gift. It was not until Jeffrey Katzenberg was fired and a new producer hired did Robin Williams return to Disney. Through this new producer, a public apology was given (by the producer). Promises were made to right wrongs, and Robin Williams was so touched that he came back as the Genie for the second direct-to-video sequel, Aladdin and the King of Thieves (1995) (V). Disney was so thrilled that they threw out the previously completed recording sessions with Dan Castellaneta.