Court papers said that Nicholas John Roske, who was 26 years old, planned to kill a Supreme Court Brett Kavanaugh and was carrying a gun and a tactical knife.
Around 01:00 local time, the suspect was taken into custody (06:00 BST).
Before a landmark decision on abortion rights in the US, more has been done to protect the justices.
A report filed in US District Court says that two US Deputy Marshals saw Mr. Roske getting out of a taxi in front of the home of a Supreme Court Brett Kavanaugh.
Mr. Roske turned to walk down the street with a suitcase and a backpack on his back.
Soon after, a man who said his name was Mr. Roske called the emergency services in the area.
Mr. Roske said he was thinking about killing himself, had a gun, and had traveled from California to “kill a specific U.S. Supreme Court justice.” Local police were sent to the home of the judge and arrested Mr. Roske there.
The Washington Post says that when the arrest happened, Justice Kavanaugh and his family were at home.
The affidavit says that while Mr. Roske was in jail, he said he “upset” about the leaked Supreme Court document on abortion and the recent mass shooting in Uvalde, Texas.
He said he thought Justice Kavanaugh might make decisions that would make it easier to get a gun.
Mr. Roske found with a Glock 17 pistol, pepper spray, zip ties. hammer, a screwdriver, a crowbar, and duct tape.
During a short court appearance on Wednesday afternoon, a judge asked him a number of questions, such as whether he was thinking straight when he was arrested.
“I think I understand pretty well, but I wouldn’t say I’m thinking straight,” he said, confirming that he had graduated from college and had been taking some kind of medicine.
On June 22, he is due back in court.
If he is found guilty, he could spend up to 20 years in federal prison for trying to kill a U.S. judge. However, sentences for federal crimes are usually less than the maximums.
A spokeswoman for the White House said that President Biden “condemns” what the person who threatened the justice did.
In May, a draft decision from the highest court in the US leaked, and it seemed to show that it would overturn Roe v. Wade, the landmark 1973 case that made sure everyone in the US could get an abortion.
The draft ruling led to peaceful protests all over the country, including some outside the homes of some of the nine justices on the court.
Last month, about 100 people marched from Justice Brett Kavanaugh home to the nearby home of Chief Justice John Roberts. Both justices are conservative and could be in favor of limiting the right to abortion.
Because of the protests, Washington lawmakers sent a bill to Congress that would give Supreme Court justices more protections. The Senate has passed the bill, but the House of Representatives has not yet taken it up.
One Democratic senator who involved in talks about the proposed bill said the last points of contention are about who will protected. Senator Chris Coons told CNN on Wednesday that Democrats believe that people who work for the Supreme Court who are not judges also need more security.
After the draft ruling leaked last month, the Department of Justice said that the US Marshals Service has providing “round-the-clock security” outside the homes of all nine justices.
Senate Republicans said that Democrats’ words were to blame for the attack attempt on Wednesday.
They pointed to what Senator Chuck Schumer said in March 2020, when he told Justice Kavanaugh and another conservative justice nominated by Trump, “you will pay the price” and “you won’t know what hit you” if they voted to take away protections for abortion.
The next day, Mr. Schumer said he sorry and denied that he was trying to scare the judges.