In 1985, Mr. Madison killed a police officer, Julius Schulte, who had been trying to keep the peace between Mr. Madison and his ex-girlfriend, Cheryl Greene, as she sought to eject him from what had been their shared home.

Mr. Madison remembers none of this. He has had at least two severe strokes, and he is blind and incontinent. His speech is slurred, and what he says does not always make sense.

He has asked that his mother be told of his strokes, but his mother is dead. He soils himself, saying that “no one will let me out to use the bathroom,” though there is a toilet in his cell. He has said he plans to move to Florida. He can recite the alphabet only to the letter G.

Mr. Madison also insists that he “never went around killing folks.”

But he can, for a time at least, understand what he is accused of and how Alabama plans to punish him.

Image Vernon Madison was convicted of the 1985 killing of a police officer, but after a series of strokes, he cannot recall the crime. Credit... Alabama Department of Corrections

“He did not remember the crime,” Justice Samuel A. Alito Jr. said, summarizing the evidence in the case, Madison v. Alabama, No. 17-7505. “He did not remember the victim.”