The 6-3 decision, which reverses an earlier court opinion, addressed only capital punishment applied to the mentally handicapped, not executions in general.
When the high court declared executing mentally retarded killers constitutional in 1989, only two states had laws prohibiting the practice. Now 18 states have adopted laws against executing the mentally handicapped, while another 12 and the District of Columbia prohibit capital punishment entirely.
"It is not so much the number of these states that is significant, but the consistency of the direction of the change," Justice John Paul Stevens wrote for the majority that included Justices Sandra Day O'Connor, Anthony Kennedy, David Souter, Ruth Bader Ginsberg and Stephen Breyer.
Stevens wrote that the intelligence levels of the mentally handicapped "do not warrant an exemption from criminal sanctions, but they do diminish their personal culpability."
Chief Justice William Rehnquist and Justices Clarence Thomas and Antonin Scalia dissented, with Rehnquist writing the majority was "seriously mistaken" in what he called an emphasis on opinion polls and views of national and international observers, the Associated Press reported.
The decision means people convicted of murder will not face a death sentence if they can prove they are mentally retarded, a condition usually marked by an IQ of 70 or lower.
The ruling came in the case of Virginia inmate Daryl Renard Atkins, described by his lawyers as a man with an IQ of 59 who has never been employed or lived on his own. Atkins was convicted in 1996 of shooting an Air Force enlisted man.
The state had argued Atkins planned the killing and understood the consequences of his actions.
Justice O'Connor, who favored Thursday's ruling, wrote the 1989 decision upholding a state's right to execute mentally retarded killers.