Aleister Crowley appears as a character in the story. Of course, the real Aleister Crowley wasn't nearly so... pretty.
Aiwass also makes an appearance as an otherworldly being who is also Crowley's mentor. "Aiwass" was the name of the voice that the real Crowley claimed to have heard in dreams that dictated the Book of the Law to him.
While not the only anime set in the Bakumatsu period (and thus all characters are Historical Domain Character), Gintama is one of the few that completely reinvent/exagerate character traits (e.g. Saigo Takamori is a transvestite, Hijikata Toshizo is crazed about Mayonnaise, and Kondō Isami is a stalking gorilla). Also mixed in people that are far more legendary, such as Kintaro and Hyubei, and you have a crack manga.
The Gundam saga uses expies of historical characters instead: e.g. Char Aznable (AKA: "The Red Comet") is an expy of Manfred von Richthofen (AKA: the Red Baron), Andrew Waltfeld is an expy of Erwin Rommel (the original Magnificent Bastard), etc. Things get complicated when later series start featuring expies of expies of historical people...
Hetalia: Axis Powers has several brief appearances of historical characters, often as the bosses of the nations.
Similarly, there are having them simply interact with the nation-tans. There's even one where Benjamin Franklin figures out America's true identity.
In the 1970s, Toei made Ikkyuu-san, an anime based on the (possibly fictionalized) earlier Zen Buddhist monk (according to That Other Wiki) Ikkyuu.note which ran until 1982.
They also made an anime based on the earlier life of Tokugawa Ieyasu.
Lucy-May of the Southern Rainbow (set in 1800s Australia) has Colonel Light, the city planner who started the Australian town of Adelaide. He fishes with Lucy-May's brother Ben and has various conversations with him.
Red River (1995) is based on actual Turkish history, including The Manly Deeds of Suppiluliuma and The Ten Year Annals of Mursili II. Both of those books were written by the actual Mursili II, who is Prince Kail in the story. Protagonist Yuri Suzuki is mostly believed to be a Composite Character of multiple, influential women, including Prince Kail's legal wife.
Read or Die has several characters who are actually clones of historical ones, such as Beethoven and Mata Hari.
Many of the characters in Vinland Saga are actually historic people, among them Leif Erickson, Canute, and Sweyn, and possibly even the Jomsvikings, although it's difficult to tell if the Jomsvikings are just myth or if there was an original kernel of truth that was later built upon and exaggerated in tales. (Technically even main character Thorfinn "Karlsefni" is one too, there really was a Thorfinn "Karlsefni" Thórdarson who was an explorer associated with Leif Erickson, although much of the life of the fictional version is entirely made up.) There was also an actual Thorkell the Tall who fought for the English and joined Canute, but it's not known if he was really a giant who could kill a hundred men with his bare hands.
Ya Boy Kongming! (AKA Paripi Koumei) is a Fish out of Water comedy about Zhuge Liang, 3rd century Chinese strategist featured in Romance of the Three Kingdoms, getting reincarnated in 21st century Japan and becoming the manager of Eiko Tsumiki, an up-and-coming musician.
Yo-kai Watch: When Thomas Edison died, he became a youkai called T. Energison.