Activists embedded a video statement on the homepage of the United States Sentencing Commission, an agency of the US government.
The statement referred to the death of Mr Swartz, an internet activist who apparently killed himself in January.
“Two weeks ago, Aaron Swartz was killed, because he faced an impossible choice. He was forced into playing a game he could not win.”
Mr Swartz, aged 26, was facing hacking charges and is believed to have committed suicide.
His federal trial was due to be held next month. If found guilty, he could have faced up to 35 years in prison.
Following his death, Mr Swartz’s family released a statement blaming “intimidation” and “prosecutorial overreach” from the criminal justice system.
‘Operation last resort’
The attack on the website was scheduled to begin at midnight eastern standard time, according to documents that appear to have been posted online by Anonymous activists.
Later on Saturday the website was not functioning.
The United States Sentencing Commission (USSC) is responsible for issuing sentencing guidelines for US federal courts.
The hackers, who had labelled the attack “Operation Last Resort”, said the site was chosen for symbolic reasons.
“The federal sentencing guidelines… enable prosecutors to cheat citizens of their constitutionally-guaranteed right to a fair trial, by a jury of their peers and a clear violation of the 8th amendment protection against cruel and unusual punishments,” the video statement said.
The statement also suggested the hackers had sensitive information relating to a number of US judges that may be made public.
There have been numerous attacks by hackers operating under the Anonymous banner in recent months.
On Thursday two British men were jailed after taking part in attacks on payment services including Paypal, organized by Anonymous.
Government websites of the UK and other countries have also been the subjects of attacks.