Retiring Justice Sandra Day O'Connor wrote the decision that went against a disabled man, James Lockhart, who had sued claiming he needed all of his $874 monthly check to pay for food and medication.
His government benefits had been cut by 15 percent to cover debts he incurred for college in the 1980s.
Lockhart also lost at the San Francisco-based 9th U.S. Circuit Court of Appeals, which said that Congress had eliminated a 10-year time limit on the government's right to seek repayment on defaulted student loans by seizing payments, including Social Security, to individuals.
The Bush administration had maintained that the case was important because outstanding student loans total about $33 billion, which includes about $7 billion in delinquent debt. Of the delinquent loans, about half are over 10 years old, government lawyers have said.
Justices were called on to clarify federal laws that sent conflicting messages about the collection of loans that are more than a decade old.
In a concurring opinion, Justice Antonin Scalia said that Congress "unambiguously authorized, without exception, the collection of 10-year-old student loan debt ... in doing so, it flatly contracted and thereby effectively repealed part of the Social Security Act."
He complained that Congress in passing laws often wrongly claims they these acts cannot be changed in the future. Such an attempt "does no favor to the members of Congress, and to those who assist in drafting their legislation," Scalia wrote.
Groups like the AARP and the National Consumer Law Center had urged the court to safeguard Social Security benefits in the Lockhart case, arguing they "are critical in preserving a measure of financial independence for older and disabled workers."
Lockhart, 67, a former postal worker who now lives in public housing in Seattle, has heart disease, diabetes and other health problems. He has about $77,000 in student loan debt.
O'Connor's ruling, a brief 4 and-a-half pages, will likely be one of her last. She is retiring after 24 years.
Also Wednesday, new Chief Justice John Roberts announced his first ruling, in a case involving legal fees. The 9-0 decision backed insurance companies, which argued that they should not have to pay legal fees of a New Mexico couple in a case that was shuffled from state court to federal court, then back to state court.
The Supreme Court also dived into the internal workings of jury deliberations in capital cases Wednesday, debating whether jurors could have lingering doubts about a defendant's guilt after a conviction and whether they could find that evidence for and against the death penalty was evenly balanced.
Less than a week after the nation's 1,000th execution since states resumed capital punishment, the justices devoted their entire argument session to whether the Oregon and Kansas Supreme Courts had correctly interpreted the Eighth Amendment's prohibition on cruel and unusual punishment.
In both arguments, the justices struggled to understand the positions of attorneys for the death row inmates who wanted the high court to stay out of their cases, and did little to support the rulings from the state courts that said the Constitution protects their clients.