Cannibalism is the consumption of another human's body matter, whether consensual or not. In the United States, there are no laws against cannibalism per se, but most, if not all, states have enacted laws that indirectly make it impossible to legally obtain and consume the body matter. Murder, for instance, is a likely criminal charge, regardless of any consent. Further, even if someone consents to being eaten and kills himself, the cannibal may still be liable for criminal or civil actions based on laws governing the abuse or desecration of a corpse, which vary from state to state.
The case that established in the common law that necessity is not a defense to murder also involves cannibalism. Regina v. Dudley and Stephens is an English criminal case concerning two men who survived a shipwreck in the 19th century. The defendants and two other shipmates were marooned on a raft after their vessel was destroyed in a storm. They had no fresh water and little food. In desperation, one of the men drank sea water to slake his thirst, but it only made him sick with dehydration and eventually he lost consciousness. Dudley then killed him and the three survivors drank his blood and ate his meat for the next week before being rescued. Despite the dire circumstances and evidence that the victim was near death anyway by the time Dudley killed him, the defendants were found guilty and sentenced to death. Their sentences were later commuted to six months in prison.
In 2001, a German man named Armin Meiwes found someone through a cannibalism fetish website to consent to being killed and eaten. After meeting, Meiwes killed the victim and butchered his body, freezing the meat for future consumption. Meiwes was apprehended and arrested several months later. Although cannibalism was not illegal in Germany, Meiwes was initially convicted of manslaughter. He later received a retrial at the prosecutors' request, and was convicted of murder.