There are no cheat codes to unlock Blackbeard in LEGO Pirates of the Caribbean: The Video Game. He unlocks through normal progression—patience and exploration are the only "cheats" needed.
Blackbeard typically unlocks late in the game or via a specific treasure chest in a Free Play area. If you're stuck, check a guide for the exact location—but the fun is finding it yourself.