The arrest of the judge, identified as Naqibullah, comes a week after authorities announced the arrest of two al-Qaida operatives in connection with the bombing of the US firm Dyncorp which trains the Afghan police force and provides President Hamid Karzai's personal bodyguard.
At least nine people, including three Americans, were killed in the 29 August car-bomb attack.
Naqibullah, who goes by one name, was arrested after intelligence agents questioned the two other suspects, Supreme Court spokesman Waheed Mujda said on Saturday.
"The two other suspects who were arrested earlier told security agencies that the judge had links with them," Mujda said.
He said explosives were found in Naqibullah's house during a search operation by intelligence agents.
"The operation took place on the night of 3 January and was directed by Afghan intelligence," said Nato peacekeeping force spokesman Lieutenant Commander Ken MacKillop, adding that international troops were not involved.
Naqibullah was serving as head of the Primary Court of Panjshir province, north of Kabul, Mujda added.
"The two other suspects who were arrested earlier told security agencies that the judge had links with them"
Supreme Court spokesman
Muhammad Haider, a Tajik national, and another man were detained weeks earlier for orchestrating the Dyncorp attack and a bombing in Kabul's Chicken Street shopping area.
The attack on the US security contractor, the biggest in the Afghan capital last year, and the bombing in October shortly after the country's first presidential election raised jitters.
Afghan intelligence officials confirmed they had pulled in two suspects linked to the Dyncorp blast but released no further details.