This is an excerpt from this article:
With a whimper, not a bang: 15 particularly depressing cinematic swan songs from talented actors 14. Orson Welles, The Transformers: The Movie (1986)
Technically, Orson Welles’ last film role was the 1987 romantic comedy Someone To Love, a minor but not horribly embarrassing grace note. But Love wasn’t actually the last film Welles worked on before his death in 1985-that honor falls to an 84-minute animated toy commercial called The Transformers: The Movie. Welles lent his voice to Unicron, a planet that could transform into a giant robot in order to destroy other robots and attack Cybertron, the homeworld of the Decepticons and the Autobots. The film is brisk and largely inoffensive (and a damn sight less soul-sucking than the big-budget Michael Bay version), but there’s something terribly sad in knowing that the man who gave us Charles Foster Kane and Harry Lime spent his final weeks delivering lines like “This is my command: You are to destroy the Autobot Matrix of Leadership.” There were rumors that Welles died before completing the project, leaving fellow cast-member Leonard Nimoy to fill in the blanks, but the truth is even more depressing; Welles finished his role a mere five days before his heart gave out for good. (Transformers was also Scatman Crothers’ final role. Thankfully, Judd Nelson survived his work as Hot Rod.)
From the geniuses over at the A.V. Club.