I've been perusing both of them because I have an interest in laws of the past, and I cannot seem to find any outstanding similarities between the two.
I'd imagine this question needs some significant clarification to be helpful. These sets of laws are almost 4000 years apart and come from widely different traditions, so I wouldn't be surprised if there are literally no similarities beyond the simple "don't kill, steal, etc." laws that are common to basically every law code. Beyond that I'd imagine that the two codes will be studied by different people for different reasons, so I doubt there's going to be one individual who can easily answer this question to its fullest extent.
I would also caution against seeing the laws of Hammurabi as a "code" in the same manner as the Napoleonic Code was. It's my understanding that the Napoleonic Code was meant to be as universalizable as possible, and to apply to all people living in France at the time. The laws of Hammurabi almost assuredly did not have this same force to them, and Hammurabi himself only calls them his "judgements". Another difficulty will be in understanding social classes in Hammurabi. There are 3 distinct categories outlined: awilum, mushkenim, and wardum. I'm purposefully leaving those untranslated because the only class we know for certain is wardum, which means slave. We have no idea what the difference between an awilum and mushkenim is, or even what it means to be an awilum.
I think that this question is somewhat similar to asking "What are the similarities between Principia Mathematica and General Relativity?" One quite clearly influenced the other over time, but in order to understand that you'll need to look over hundreds of years of scientific history. Similarly to understand the similarities between those two extremely disparate sets of laws I think you're going to need to fill in the legal history in between as part of your answer.
As stated by others, its a bit of stretch to compare the two, with so much coming in between.
Essentially they contain the same general principles. Although its more vague and intertwined than that. While Napoleon didn't rely per se on Hammurabi, he relied on French scholars like Portalis as well as Justinian's Corpus, which contained some things from Hammurabi. Both are "codes" in a sense that they are cleanly written and organized. The statues (articles) are short and generally very vague, meant to be applied by jurists/judges and use their knowledge and understanding to resolve issues. This in contrast to the common law which has highly complex statutes and essentially handcuffs jurists to them, with little wiggle room. Thats all really general and may not even be helpful to you, but the comparison is tough because most of the civil codes derive moreso from old Roman law, and the French/German/Spanish scholars from the period after the fall of Rome.
They are so far apart, with so many huge inspirations for Napoleon coming in between that its hard to attribute any of the characteristics as coming from Hammurabi. But they clearly both are meant to be read simply, by the common people, and written in a way that was vague enough to change over time, as well as be easily promulgated.
You may be able to get a better answer, I admit I am not an expert here. Merely a law student. But it is well documented that the Napoleonic Code is heavily influenced by Justinian and the CJC, maybe you would get more info by comparing those two