In a literal case of "Executive" meddling, Shakespeare wrote The Merry Wives of Windsor in response to Queen Elizabeth I's insistence that he feature the character John Falstaff in a comedy. Falstaff's previous appearances had been in histories set in the 14th and 15th centuries; The Merry Wives arbitrarily plucks him out of time and places him in the contemporary 17th century.
It's also believed that this is why Hamlet had to die in the end; law at the time stated that anyone who killed the king in a work of fiction could not survive, even if the king in question killed his predecessor to usurp the throne.
Henrik Ibsen's A Dolls House created enormous controversy for its time with its story of a housewife who realizes her husband has no real respect for her and eventually works up the strength to leave him. For its production in Germany Ibsen was forced to write a new ending where the husband drags her to see her children, and she realizes she can't leave them. Reading it, one gets the idea Ibsen deliberately made it as last-minute and unbelievable as possible.
Stan Freberg ran into a crazy example of this when he tried to adapt his successful comedy album Stan Freberg Presents The United States Of America to the stage. The legendary (and infamous in theatre circles, at least partly for providing several examples of this trope) producer David Merrick became interested after hearing just the first third of Volume One. However, first he told Freberg NOT to record Volume II for a while, so that it wouldn't compete with the Original Cast Recording. And then there were arguments over the size of the orchestra; Merrick said the orchestra should be bigger, and then changed his mind and said it was fine as Freberg had originally conceived it. Merrick continued to play mind games with Freberg for a while, culminating in meddling with the script. Infamously, he told Stan Freberg to "Take Lincoln out of the Civil War. He doesn't work!". He also told Freberg to move Barbra Frietzche (of the Civil War poem of the same name) from the Civil War to the Revolutionary War. This was more or less the last straw, and Freberg (under advice from his wife) abandoned the project while he still had his sanity and integrity intact. The adaptation was cancelled, Freberg then devoted his energies to advertising, and Volume II of The United States of America would not be completed and released until 35 years later.
As stated above, David Merrick was quite infamous for this. According to anecdote, he tried to cut "Meadowlark" from The Baker's Wife by going into the orchestra pit and tearing up the parts. "Meadowlark" became the show's best-known song after Merrick canceled what would have been the original Broadway production out of town.
The musical City of Angels is all about this trope. It involves the struggles of a crime novel writer named Stine, as he attempts to adapt one of his crime novels as a movie. Unfortunately, the film's producer Buddy Fiddler insists that he make all sorts of crazy changes to the script.
The authorities made Giuseppe Verdi completely rewrite A Masked Ball several times, because the original version was about the assassination of King Gustav III of Sweden. He changed it to a fictional governor of colonial Massachusetts in Boston.
Averted with extreme prejudice by most Fringe Festivals. Fringe Festivals are unjuried theatre festivals designed for maximum artistic freedom; as long as you have the legal rights to perform a play (either by way of securing said rights or writing the thing yourself) and your entry fee cheque doesn't bounce, they'll give you a venue and won't stop you from doing whatever you please onstage.
An in-story example: in Andrew Lloyd Webber's The Phantom of the Opera, the theater managers refused to acquiesce to the Opera Ghost's demands that Christine Daae be cast as the Countess in Il Muto, instead casting Carlotta as the lead and Christine in a silent role. The Phantom was displeased. After humiliating Carlotta on stage, he later confronted the managers and demanded that they produce his new play, Don Juan Triumphant... in the executive's favor, Don Juan Triumphant kinda sucks.
"And the managers must learn that their place is in an office, not the arts."
It is widely speculated that the ending of Molière's scandalous play Tartuffe may have been edited.
Cyrano(whose face stiffens at once): Impossible! My blood congeals to think
That other hand should change a comma's dot.
Subverted in Don't Blame Me, I'm Just the Playwright, a short play that features massive amounts of this trope In-Universe. The two playwrights are trying to make a serious play called Last Visit about a girl with two weeks to live. Executive Meddling turns it into a musical comedy, adding fart jokes, vampiresnote hilarious TwilightShout-Out, and a psychotic, anorexic diva for the lead. The playwrights come perilously close to washing their hands of the whole thing ... then the finished play turns out to be a hit and they figure, what the hell.
Ayn Rand's preface to Night of January 16th complains about the producer who brought it to New York not only changing the play's title but hiring a ghostwriter to insert superfluous forensic experts and alter many of the original lines.
The P.D.Q Bach half-act opera The Stoned Guest was intended to end with all four characters with speaking roles (The fifth character is a dog) killing each other. Then his sponsor told him that the ending was too depressing. So the ending was edited so that all four characters kill each other - and then they all spontaneously come back to life and sing about how they've somehow achieved a happy ending.
Pippin had many rewrites forced on the script by Bob Fosse. Schwartz and Hirson objected in particular to the abridgement of Pippin's final line, "Trapped, but happy..." to just "Trapped...", and the licensed version restored the two deleted words.