In Yu-Gi-Oh! this is Yugi's strategy when he goes against Pegasus. Pegasus can read minds, but Yugi is possessed by the spirit of the Pharaoh, giving them two minds to work with. They come up with a "mind-shuffle" strategy, whereby any time one of them draws or plays a card they immediately switch minds. The other mind doesn't know what card the other one saw, so whenever Pegasus tries to read their mind all he gets is blank cards.
In Devilman, it turns out that Ryo Asuka is in fact the avatar of Satan, who had his memories suppressed and turned into a human in order to infiltrate mankind and learn their weaknesses. This goes to plan, except that Ryo/Satan falls in love with Akira/Devilman, who until then were allies against the demons.
The Magnificent Bastard Lelouch Lamperouge in Code Geass uses his mind-controlling power on himself to forget his real plan in order to save his kidnapped sister Nunnally from the mind-reading Mao. He goes as far as allowing himself and the audience to think his sister is dead (mainly to satisfy his scenery-chewing impulses) before his forgotten plan springs into action.
In Naruto, it turns out that The Dragon Kabuto was originally a servant of the late Akatsuki member Sasori, and had a memory block placed on him in order to spy on his former partner Orochimaru. Subverted in that it was found out earlier, and the block was removed, and Kabuto decided to switch loyalties to Orochimaru.
Subverted even further. He was infiltrating Sasori for Orochimaru to begin with.
In Mahou Sensei Negima!, Shiori's Artifact certainly has some degree of Memory Gambit in it, while it's certainly possible that Asuna suffers from one which Ala Rubla installed.
Law enforcement in Kaiba is Genre Savvy enough to realize this trope can be used, though it never actually is. An officer is suspicious of Vanilla because he's stopped backing up his memories, noting that people have a tendency of doing this after they've experienced a life event that may cause them to seriously consider committing crimes.
Takizawa Akira from the anime Eden of the East does this twice in the beginning of the anime and in the end (which is continued with the movie, in which the memory loss is one of the principal topics).
In Future Diary, something similar is done, but with the future instead of the past. Yukiteru and Yuno are trying to break into a vault, but don't know the code to unlock it, and there isn't much time left. Yukiteru goes to apprehend someone who knows the code. He looks ahead an hour or so in his diary to find what the code is within seconds and without ever leaving the vault.
In Bleach, Ginjo does this so he can manipulate Ichigo into doing his bidding without any risk of letting Ichigo know his true motives, and lead him into a trap with incredible ease.
In Puella Magi Madoka Magica, there seems to be one of these, possibly accidental, going on when Kyubey makes a contract with Homura. Madoka's insane power level comes from Homura repeatedly traveling through time to save her. Kyubey doesn't remember making the contract, but he realizes why Madoka is so powerful immediately after he learns that Homura can time-traveland congratulates her, suggesting that he contracted with her because he hoped she would do this. His bizarre morals forbid outright lying, but since he genuinely doesn't know why Madoka is so powerful, he doesn't tell anyone, and Homura's time-warping continues unwittingly making the situation worse for Madoka and better for Kyubey.
In A Certain Scientific Railgun, Misaki Shokuhou altered her own memories so that Exterior's self-destruct code and limiter release code were switched. As a result, Gensei Kihara entered the wrong code and didn't suspect a thing until it was too late.
During the Silver Age, Superman pulled one of these, using mind-altering and shape-shifting technology to infiltrate a planet filled with his most dangerous enemies, who had banded together into the ultimate Legion of Doom, The Superman Revenge Squad. Their security, of course, included mind-reading machines. The Man of Steel ended up with a nasty case of Amnesiac Dissonance courtesy of the Squad for his trouble, and was only just barely saved by The Power of Love. Awww...
Lex Luthor also tries to pull one of these in the Bronze Age. It backfires horribly, as his erasing of his memories of the scheme causes him to actually fall in love with a woman whose life was going to be sacrificed by the scheme. When she gets irretrievably dimension dumped in a futile attempt to get rid of Superman, Lex completely breaks down.
In the X-Men, a diary of future events was hidden, and the location then wiped from the memory of the person who hid it so that enemy telepaths would be unable to pry its location from an unsuspecting mind. Of course, a needlessly elaborate double-blind keyword system was established to restore the memories when required.
In the first The Sentry miniseries from Marvel Comics, the eponymous hero has suffered amnesia for years, AND nobody remembers he existed either. He sets out to find out who did this. It turned out it was himself, since, for some reason, knowledge of his existence allowed a dark force known as The Void to exist. He ends up erasing his memories away again at the end.
This was then retconned in the character's later appearances, to the point of becoming a Continuity Snarl.
In the Lucifer series, it seems that when Fenris has nothing else to destroy he must turn on himself. So he fed his memories and potency to a number of other gods, and comes back to collect them after Creation starts falling apart.
Hal Jordan repeatedly used this trick against the Old Timer. He used his power ring to send SOS messages to Guy Gardner and then later to the other Guardians and the used the ring to erase his memories so that the Old Timer wouldn't know what he did.
During the Justice League storyline "Tower of Babel", it is revealed that Batman has his computer set to speak mnemomic trigger words to him at preset times. Though he doesn't know why he set it at first, hearing the word unblocks the subconscious memories of his secret project to develop counter-measures to the rest of the Justice League members. When he is finished working, or if certain mind readers come within a hundred miles, another trigger is used to suppress the memories untill the next session, so that said mind readers would never be able to accidentally glean this information from him. Typical Batman.
In Locke & Key, Tyler suggests to the Big Bad that he has hidden the Omega Key and removed his memory of the hiding place using the Head Key. How he intends to find it again himself has yet to be revealed...
Hilariously enough, she eventually can't resist activating the device to uncover what the plan is.... only to find a recording of her past self berating her for nearly ruining the entire plan.
In Empire Snape obliviated everyone who learned of Harry's abuse on Dumbledore's orders but added an additional enchantment so that those obliviated will regain those memories if a Trigger Phrase is uttered.
Death Note Equestria, being Death Note with ponies, naturally has Twilight eventually carry one out against L. Due to the Gambit Pileup in this story being even more complicated than in canon, the Memory Gambit is similarly more complicated than the canon one. It still results in L's death and Twilight's victory.
In Backwards With Purpose, a Harry Potter Peggy Sue fic, the characters become aware of another time-traveller, nick-named "Merlin", who seems to be orchestrating one of these on the entire cast, though they have no idea how or why. Its Harry's son.
The Big Bad of Pokeumans is running a global one of these: every time someone witnesses a transforming Pokeuman or anything relating to their secret war, a Psychic type is sent to delete the memories of any witnesses.
In the original Total Recall (1990), Quaid finds out that he is actually the villain's henchman and had intentionally subjected himself to memory alteration to fool the telepathic leader of La Résistance. Of course, it didn't exactly go as planned. Not only didn't it go as planned, but the plan nearly fell apart right at the beginning with Quaid going to Rekall and accidentally activating his memories too early.
The remake has the same, except Hauser actually did make a Heel-Face Turn before being captured and mind-wiped. However, Cohaagan was willing to replace Quaid's personality with an old recording of Hauser's prior to the Heel-Face Turn.
Paycheck is an example of the Note to Self variant: the protagonist knew his memory would be wiped at the end of his current job, and built a plan to lead himself to the needed information after the wipe.
With the added help of a machine that can see the future.
Men In Black II: Kay can't remember where he stashed away the MacGuffin, and reasons that he must have neuralized himself to avoid disclosing its location, after placing clues that would lead him (and only him) to it.
Kay had to restore his memories twice in the film. In the original Men In Black, Kay is neuralized at the end of the film so he could resign. He was dragged back into the organization by Jay and had his memory restored within the first half of the film. But because his memory of where he had hidden the MacGuffin had been neuralized away long before the final neuralizing at the end of MIB I, they weren't there to be recovered by the deneuralizer.
An unwilling example is Leonard Shelby in the film Memento, who suffers from anterograde amnesia after a burglar attack, preventing him from forming new memories after the attack. Through conditioning and a system of messages, he guides himself along a path of revenge to kill the man he believes killed his wife in the attack. He also occasionally manipulates himself in other ways, such as hiring a prostitute to help relive the night of his wife's murder.
Note that in the last scene he deliberately sets himself up to kill Teddy.
Johnny Favorite pulled this one to beat the Devil in Angel Heart. It didn't work.
In Push, the only way to evade Watchers is to get your memory wiped, since they track you by your intentions. Kira evaded them this way in the beginning. In the climax Nick plans another one by writing on letters, giving them to the secondary characters, and tells them not to open the letters until a certain time. He them gets his memories of those letters erased, so that way nobody really knows what they're doing.
The Arnold Schwarzenegger film The 6th Day has an interesting variation on this. The villains have the ability to scan the memory of a living or recently-deceased person, and thereby see what that person has seen. In order to get around this problem, Schwarzenegger's character and Schwarzenegger's character's clone (also played by Schwarzenegger, naturally) concoct a plot together in which real-Arnold carefully avoids falling into the field of vision of clone-Arnold. That way, clone-Arnold can run into the evil laboratory as a distraction, disarming the security cameras along the way, but when he falls into the clutches of the villains, their scan of his recent memory does not reveal that real-Arnold is waiting just outside, planning to enter unseen thanks to the disabled security cameras. The villains eventually do figure out what is going on, but it buys the hero enough time to accomplish his main objectives. It's all a little tough to follow in writing, but it is fairly cleverly done in the film.
A subversion in Shaman of the Undead. Karev has his memories partially erased after his wife's and child's death and everybody thinks this is because he killed them and don't want memory-readers to prove it. Not really. Child died of sickness and wife committed suicide and turned into a tree, so Karev, suffering a massive depression, asked a friend to erase his memories of them. Only it had Gone Horribly Wrong and as he started to remember tree-wife, he also stated to sacrifice her lookalikes to feed her... long story.
A minor but still valid example in Harry Potter and the Order of the Phoenix is Snape bottling key memories in the pensieve to keep Harry from seeing them during Occlumency lessons, though this backfires. And though Dumbledore claims to use the pensieve to organize his thoughts and free up space in his head, he may have been misdirecting, with hiding dangerous memories being a greater motivation.
Artemis Fowl trades his memories about the Fairies' existence for their help in The Eternity Code, but leaves himself plenty of triggers to bring them back. All but one of them are dummies, however, which he actually intends for Faeries to discover, because he knows they know he'd try to leave himself triggers. So after they find over a dozen of dummies, they are lulled to believe that that is it, and Artemis happily regains his memories in the next book, The Opal Deception, using the only real trigger.
Well, it was the only one he intended to work, but any of them would have been fine.
During the pre-mindwipe interrogation, Artemis nervously thought to himself that 'his lifelines to the past were being cut one by one' as the faeries uncover each of Artemis' fake leads. This implies that Artemis wasn't putting all his eggs in one basket with the 'real' trigger (which, considering the character that held that trigger, may make sense.)
In Children of Dune, Ghanima Atreides hypnotizes herself to believe that her brother had been successfully assassinated.
Zaphod Beeblebrox of The Hitchhiker's Guide to the Galaxy purposely fiddled with his own brain in order to keep his involvement in a conspiracy to find and possibly replace the Ruler of the Universe from being telepathically uncovered. He never actually regains full awareness of his prior self, and is trying to get as far away as possible from his past plans; he keeps fulfilling them anyway due to subconscious commands and blind chance (which, thanks to the improbability drive on his ship, isn't really blind at all).
"It's not what you've done they're worried about," said Roosta, "it's what you're going to do."
"Well don't I get a say in that?"
"You did, years ago. You'd better hold on, we're in for a fast and bumpy journey."
"If I ever meet myself," said Zaphod, "I'll hit myself so hard I won't know what's hit me."
Glasshouse by Charles Stross begins with the protagonist waking up after having wiped his own memory, so that he would be allowed to infiltrate the eponymous experiment.
Look to Windward by Iain M. Banks is built around a Memory Gambit. The character Quilan's memory returns to him in stages during a genocidal and suicidal undercover mission, alternate chapters take the reader through the past events he has forgotten, slowly revealing both what the mission is and what kind of a man would agree to do it.
In Second Foundation by Isaac Asimov, the telepathic villain known as the Mule is hunting the Second Foundation. As several of his mentally dominated servants have lost their minds the Mule chooses Bail Channis, someone he knows is a Second Foundation spy, to help him find them. He doesn't dominate Channis because he's afraid Channis will lose his mind. Channis is tricked into leading the Mule to the Second Foundation, and everything falls apart. This is one of the most complicated memory gambits ever. Indeed - the climactic scene consists of repeated "but I planned that" banter.
In Forgotten Realms novel Extinction one funny creature thought constantly reading the mind of Gromph Baenre, the Archmage of Menzoberranzan, menacing him with a weapon and its own powers and keeping him slowed is enough to keep him under control, but it was dead wrong—and then just dead. He knew many critters and mages can read thoughts, so he keeps one more dirty trick up his sleeve just for this case, and even himself doesn't know which trick and which sleeve. High-status drow as well as high-level wizards tend to be both Properly Paranoid and Crazy-Prepared.
Used in E.E. Smith's Gray Lensman. Kimball Kinnison has his friend Worsel impose false memories when Kinnison infiltrates Boskone headquarters Jarnevon toward the end of the story. It becomes crucial to remove a thought screen to let Worsel restore Kinnison to himself (Neuro Vault).
Used again in homage in Randall Garrett's Lord Darcy stories, in the form of The King's Messengers, who receive their messages orally, then have the memory of the message locked away by magic so that even they themselves are not aware of what the message is. Only the proper triggering situation restores the memory. Trying to extract the message in any other way results in the messenger's immediate death.
Pandora's Star has a character who wipes his memory in an attempt to get away with murder. It doesn't work.
One of these is key in Down and Out in the Magic Kingdom. Debra takes advantage of the short-term memory wipes caused by re-uploading to concoct a scheme to get Jules out of the way just long enough so she can conquer the Hall of President. When she returns based off of earlier memories, she has no idea what she's done. And she would have gotten away with it, too, if Dan hadn't decided to spill the beans.
Note that in this setting every human being can easily pull off a Memory Gambit and most people consider it an obvious step to take after committing a crime.
In The Dresden Files: Ghost Story, it is revealed that Harry's murder in the end of the previous book was this mixed with Thanatos Gambit: before accepting a Faustian Bargain with the Winter Queen Mab, he contacted Kincaid to kill him a few hours later, then persuaded Molly to erase his memories of the arrangement to fool Mab.
In the Doctor Who New Adventures novel Set Piece, the Doctor wipes his mind of his plan to stop the Big Bad, so that the Big Bad can't work it out. Unfortunately, he also has to wipe his mind of the trigger to restore his memory.
Ace: You've finally done it. You've even bamboozled yourself.
In John C. Wright's Forgotten Causes, Marshall Lamech finds he's done this to himself in order to judge a situation without prior prejudices. He then spends the rest of the story bumbling from one frying pan to another, and cussing himself out for being too clever by half.
In Inheritance, all who visit the Vault of Souls have their memories wiped to protect what's in it. There is a spell in place to restore all of the memories when (and if) Galbatorix is defeated.
Inverted in Solo Command. Kirney Slane is about to infiltrate a hated enemy, pretending to work for them. She brings along her astromech droid Tonin, but she knows the droid's memory will be scanned when she arrives at her destination. To get around this, she makes a side trip to an abandoned hideout, backs up the memory and personality of Tonin in an isolated memory core, then wipes the droid's primary memory. At the first opportunity, she activates Tonin's backup memory with a Trigger Phrase. She immediately apologizes for the treatment; Tonin doesn't seem to mind too much.
The Emily The Strange novel "The Lost Days" features Emily waking up to find herself in the middle of one of these: She's in a strange town called Blackrock, she has no idea how she got there, and she doesn't remember anything about herself. Near the end of the novel, it's revealed she received a posthumous letter from her great-aunt Emma, asking her to come to Blackrock to collect her inheritance. The letter also warned her about a young psychic in the employ of Attikol, her rival for the inheritance. In order to keep the psychic from learning what she knew, she temporarily erased all of her memories, but not before making sure that she'd have backup in place in the form of an android named Raven. She later has to repeat the process when her accomplice in the plan uses a Trigger Phrase to restore her memories before the right time. Finally, she does a variant of this by erasing the memories of the accomplice (with her permission) and causing her to assume the identity of "Earwig" (Emily's amnesiac persona) for a short time because she was about to make a bet that would result in her having to join her enemy's traveling show, but she couldn't actually go herself.
The Kleptomancer in Frances Hardinge's A Face Like Glass does this, regaining various memories at different stages of his elaborate plan to control Caverna.
The Nightmare Academy books have this (in a roundabout way). The Hags are monsters who eat memories like candy. Of course, since the Hags are Vain Sorceresses, emphasis on the vain, the heroes can flatter them until they give the memories back.
Live Action TV
An involuntary one in Agents of S.H.I.E.L.D.: One of Coulson's current drives was to find out who supervised Project T.A.H.I.T.I., since, after The Reveal that S.H.I.E.L.D. was infiltrated by HYDRA, Coulson suspected that HYDRA might have had a hand in resurrecting him and possibly using him as an asset. But then, May manages to get Coulson the file that reveals who supervised the project... and it was Coulson himself, under Nick Fury's orders. T.A.H.I.T.I. was a project designed to resurrect a fallen Avenger if worst came to worst, but Coulson not only recommended cancellation of the project, he even handed his resignation because of it. Coulson revealed that the only apparent way to be able to survive Project T.A.H.I.T.I. sane was through Fake Memories, since the process was so traumatic it'd drive the subject insane. And that's exactly what they did.
Dollhouse, Dollhouse, Doll-freakin'-house! The entire show is built on this premise.
In one episode of Stargate SG-1, Vala's memories are altered so that she can get close to Adria in order to make her drop her guard.
Much earlier a genocidal evil professor accidentally erased her memory, along with the memories of everyone on the planet. Upon learning who she was she willingly has her memory erased again so that she won't have to live with the guilt.
The Master, known in the old series for his frequent use of the Paper-Thin Disguise (even when disguising himself wasn't necessary) makes a grand departure from his past habits and proves to have been hiding as a human, with his memories and Time-Lord nature stored in a device looking like a pocket watch. Far from having a plan to restore his memories at just the right moment, he is an old man when these characters (not knowing who he is) accidentally make him curious enough about this watch to open it. What's worse than your old foe returning? Your old foe returning- and having gotten rather Dangerously Genre Savvy since last time around.
The Doctor himself pulled the same memory gambit earlier in Season Three in the "Family of Blood" storyline.
One Dalek scheme involved sending Daleks to World War II-era Britain to serve in the army. Their memories were altered so that they'd think they were actually British war machines. When the Doctor saw Daleks employed by Britain, he panicked and attacked them, declaring, "I am the Doctor and you are the Daleks!" This made the Daleks revert into the Omnicidal Maniacs we all know and love. At the same time, it confirmed that they actually were Daleks, allowing them access to a machine with which they could repopulate the Dalek species.
In the Red Dwarf episode "Back To Reality" parodies this when it is revealed that Rimmer was actually a hand-picked special agent for the Space Corps who had his memory erased and was programmed to behave like a complete twonk so no one would suspect he was on a mission to destroy Red Dwarf in order to guide Lister to his destiny as the creator of the second universe, but had never noticed the trigger. Except that this was all part of a group hallucination.
And the episode where they woke up 2 days after Rimmer's birthday with no memory of them, they tracked down the black box which told them why...
In Heroes Mr Bennet forces the Haitian to wipe his memories of sending Claire away for her safety so that no matter what the company does to torture him he'll never be able to reveal her whereabouts.
The first half of season 3 of Alias centers around the show's main character, Sydney Bristow, having lost two years' worth of memory (the season 2 cliffhanger had her wake up in Hong Kong two years after the events shown prior to that, with no memory to what had happened in the intervening time). Turns out she had her own memory erased after engaging in some super-complicated undercover operation to make sure the bad guys don't find out where she hid some important artifact. Too bad the bad guys find the artifact anyway, and eventually she is informed about the events of those two years, just so she knows what the bad guys are actually up to.
In "The Spy", one of the weaker episodes of Mission: Impossible, Jim Phelps has himself hypnotised to forget his actions immediately after he's done them until a specific cue is given, allowing himself to be captured by the enemy without risk of divulging the I.M. Force's plan.
An episode of Buck Rogers had Buck put on trial for causing World War III. In fact, he had allowed himself to be brainwashed in order to infiltrate a conspiracy in an unsuccessful attempt to prevent World War III.
A variant occurs in an episode of Star Trek: The Next Generation titled "Clues". The crew discover that their memories have been altered and that Data, whose memories are intact, has been lying to them. They eventually discover that they consented to the memory erasure, because the inhabitants of a newly explored planet don't want anyone to know of their existence. They weren't supposed to have figured it out, but they do anyway; at the end of the episode, they decide to try again, and it works.
An episode of Legend of the Seeker had a spy of the Big Bad kill a bunch of rebels and use a magical orb to plant false memories of the murders into the minds of others, including the hero. This was mostly done to fool the suspects into falsely admitting their guilt during Confession. One even ends up being hanged for a murder.
In Tokusou Exceedraft, Hayato is told that he is a spy for an evil syndicate who has his memories erased, and actually "regains" his memory with the help of a sinister machine. Subverted in that the memory is fake.
One of the main uses for Thought Bottle item, including at least once in a novel (see above).
In 3.5, pulling this off is entirely possible using the Autohypnosis skill.
Very possible in Shadowrun. There's specialized equipment to program individuals through simsense, and some of the fiction in the 20th anniversary book even goes into a Shadowrunner using this as a way to gather information inside a nightclub by impersonating one of the staff right down to their personality. You can even take an advantage that makes you already programmed before the game starts, and as such you can switch into and out of your "deep cover" persona with a code word - handy if your character's been captured.
The callidus assassins in Warhammer 40,000 have been known to use this trick to sneak up on psykers.
In Exalted there is a Sidereal of the Maiden of Secrets known as The Green Lady. In various guises, genders and names she serves Heaven, both Sidereal factions and 4 Deathlords. The reason she has not been found out is because she has hidden her true allegiance from even herself. For the curious, her true allegiance is to Heaven, according to the Underworld book. Her ultimate goal is to learn some singular weakness that will lead to the defeat of the Deathlords once and for all. Making any attempt to pull this off intentionally, though, is going to tip somebody off who will in turn tip everyone else off and completely screw the plan. Making herself mostly crazy and hoping to stumble onto it more or less by accident is the best she can do. However, there's a chance she may unintentionally help the Deathlords destroy Creation before she succeeds.
In Mage: The Awakening there is a rote which allows you to set up one of these by literally removing the memory from your mind until a later time. There is a Legacy which can grant this same benefit as a magical ability with the addition that when it expires, you can use it again to suppress the same memory without actually remembering the memory you want to hide.
In Transhuman Space, this is easily accomplished for AIs or people who have uploaded themselves into computer code. Memories can be erased, copied, stored, moved, sold, or simply invented wholesale.
It was Liquid Snake's soul possessing Ocelot through his arm... Hang on, it's just Ocelot and really good hypnotherapy. Hey, it fooled the Patriots And a nanomachine cocktail! The MGS Database reveals it WAS Liquid in 2, But Ocelot got the arm removed so he could continue acting like Liquid so he could enact his plan without risk of Liquid taking over again.
The player even has to pull this in order to fight an enemy in the first game.
Psi-Ops: The Mindgate Conspiracy. At the very beginning you're taken captive by a mini army headed by various types of psychics, and another prisoner reveals to you that you've gone through the same training, and then had your memory wiped so that you could sneak in.
This is the plot of Flashback: The Quest for Identity. Until it's resolved immediately after the first level to make way for the actual plot — Conrad had a good reason to do it, after all.
In Star Wars: Knights Of The Old Republic one mission features your party to be caught and your ship confiscated and searched. One escape plan (there are several options, one for each party member except Carth, Bastila and the main PC) features T3M4 getting a backup chip, so after the regular memory wipe, it can restore its memory and rescue the party. In the sequel, it is suggested that Revan might have been running one of these allalong, with the Jedi Council unwittingly playing directly into the plan.
The novel Revan reveals that this is not the case and that Revan and Malak really were forced into the Dark Side by The Emperor after failing to kill him, although Revan still can't recall those memories until he gets his mask back.
Wing Commander III revealed that Hobbes' defection to the Confederation was a Memory Gambit. (The hologram explaining that was removed from the PC version, but remained in a console version and the novelization.)
The protagonist loses his memory often in Planescape: Torment. Because he has to die in order to do so (and the present incarnation is immune to it), neither he or any of his previous lives appear to have done so intentionally. One character does tell this story, though:
A man suddenly finds himself sitting on a bench with no idea where he is or how he got there - in fact, he has no memory at all. There is an old crone sitting next to him. She says, "Well?" The man looks confused, and the old woman explains, "I gave you three wishes. Your second wish was to undo your first wish, and you still have one more. What will it be?" The man says, "I wish I knew who I was!" The crone laughs and says, "That's funny! That was your first wish!"
Though the memory loss wasn't intentional, some personalities devised gambits for others to recover memories; journals and recordings, personal contacts, body parts which when absorbed by Nameless would grant some memory and aptitude, and the tattoos created by a magical artist.
Nene pulls a rather complex one in Blue Dragon Plus. He creates a Morality Pet for himself, with memories of him dating years back, then gives himself memories of her, then erases his memories of fabricating her or the memories, all to ingratiate himself with the heroes. He also set things so that the memories would return at a certain location, effectively turning himself into a Manchurian Agent.
In Rune Factory, the protagonist has his memory wiped as one of these to awaken Terrable - a powerful dragon.
Emil from Tales of Symphonia: Dawn of the New World could fall under this category, albeit in an 'unintentional-but-we'll-roll-with-it sort of way. Really, he Created a fake version of his dormant state, merged it to the first person he came across, the proceeded to take on the identity of another random person who had just been killed, and the appearance of the best friend of the reason he was in this mess, who he killed himself, all for his own protection until his powers could recover.
Then again, since Tenebrae was fully aware of this the whole time, and took every opportunity to make fun of Emil (i.e. Ratatosk) while he had the chance, it could conceivably be classed as his gambit.
The titular amorph of Schlock Mercenary does this using his Bizarre Alien Biology when the protagonists have to submit to having their memories wiped to avoid being killed by the bad guys, storing a bit of himself (amorphs evolved from an artificial biological memory storage system) with the relevant information, hidden in an eyeball.
In Zap!, Zap himself pulls off such a gambit by way of potent precognitive abilities - thus avoiding the Gambit Roulette aspect of the trope. He essentially searched the possible paths of the future for the desirable outcome, and then reached for it - even though it meant abandoning his memories and personality on the way...
One episode of The Simpsons has Homer, of all people, execute a intentionally impossibly convoluted planto make his own surprise party a surprise by taking a drink called a "Forget Me Shot". It involves such things as planning exactly what he would do, when and what he would remember, how he was going to interpret it, and that he was going to commit suicide from it (so he told them to get a Moon Bounce and move the boat under the exact place on the bridge he went off).
An entire episode of the Legion of Super Heroes uses this, with people pretending to be people when they don't know they're that person.
In Code Monkeys Dave uses this in The Drunken Office Party episode he uses the fact that Jerry doesn't remember the night before to get him to take the blame for several things that Dave actually did himself and gets Jerry to give him the ticket to Hawaii he won because Dave promised to help him fix everything also Jerry feels bad for breaking Dave's arm, something else he didn't really do.
In Adventure Time episode "The Real You", Finn did it in using some magical glasses that make him smarter. He makes a bulleted list of what will happen for the rest of the episode, and the last few things happen after Princess Bubblegum takes off the glasses (which he also predicted).