There are plenty of cartoons featuring famous actors, but in almost all the cases the voices are caricatures, provided by someone else. In the Disney Silly Symphony Mother Goose Goes Hollywood featured speaking caricatures of W.C. Fields, Eddie Cantor, Katherine Hepburn and others, but none of the stars provided the voices. The Warner Brothers Merrie Melodies cartoon Hollywood Steps Out was similar, with James Cagney, Jimmy Stewart, Clark Gable, Greta Garbo, and others, none of whom was voiced by the actor. Years later the movie Yellow Submarine featured The Beatles – only none of the voices were actually by the Beatles (except in musical segments and the end sequence). This has been pretty much the standard.
However, there are some cases where the actual actor depicted DID provide the voice for the cartoon character – and not always in big-budget productions.
Just to get some definitions relatively straight, these are cases where the cartoon character is a caricature of the actor and is a role you would expect the actor to play, even if given another name in the production – the Beatles characters of Yellow Submarine are no more the real Beatles than the characters they played in Help, but they’re clearly supposed to be the Beatles. And cartoons using previous recordings of the actors don’t count – they had to have made the voice acting for that cartoon. So Jerry Colonna and Ed Wynn in Disney’s Alice in Wonderland don’t count. Nor to Robert Goulet and Judy Garland in Gay Purree. There’s going to be some gray areas, but I think these are pretty clear
Bud Abbott played himself in The Abbott and Costello Cartoon show, a 1967 Hanna Barbera work. He reportedly used to get fully dressed in formal suit and tie, treating it as a regular acting gig.
Woody Allen voiced the cartoon version of himself in the movie Annie Hall. There was a cartoon version of Woody Allen in the opening credits for What’s Up, Tiger Lily?, but that one had no speaking lines.
Dick van Dyke, surprisingly, provided the voice for himself in The Haunted Carnival, part of The New Scooby Doo Movies (1972-1973). So did Don Knotts, Jonathan Winters, Tim Conway, Phyllis Diller, Sandy Duncan, Don Adams, Mama Cass (!), Davy Jones, and Sonny and Cher. (Also the cast of The Addams Family, but as their characters on that show)
Groucho Marx has been voiced by many other voice actors, but he himself provided the voice for the Napoleon character from their 1924 play I’ll Say She Is for the 1970 Rankin-Bass TV production The Mad, Mad, Mad Comedians. He was 80 art the time. There are lots of other comedians who provide their own voices, but I suspect most if not all of the other ones are actually taken from recordings of their acts. But there was no recording of I’ll Say She Is (and Chico Marx’ part was performed by someone else, since he had died in 1961)
Adam Sandler played himself essentially in the 2002 Eight Crazy Nights, based mostly on his Hannukah Song.
I can make a case for the 2003 Allan Brady Show, with Carl Reiner, Rose Marie, and Dick van Dyke reprising their TV roles on The Dick van Dyke Show. But that leads to things like Gilligan’s Planet, and I’d rather not go there.
Any others?