The DSS agency says the raids were carried out in recent days and several judges were arrested.
The Nigerian Bar Association (NBA) accused the authorities of carrying out a “Gestapo-style” operation, demanding the release of those arrested.
President Muhammadu Buhari has pledged to tackle widespread corruption.
In a statement, the DSS said: “The searches have uncovered huge raw cash of various denominations, local and foreign currencies, with real estate worth several millions of naira and documents affirming unholy acts by these judges.
“We have been monitoring the expensive and luxurious lifestyle of some of the judges as well as complaints from the concerned public over judgment obtained fraudulently and on the basis (of) amounts of money paid.”
The statement said the judges were from the Supreme, Appeal and High courts.
The names of the suspects have not been released.
Reacting to the raids, the NBA called on President Buhari to “immediately caution all the state security agencies and to respect the rule of law”.
NBA head Abubakar Mahmoud told reporters: “We are not under military rule and we cannot accept this unholy event and Gestapo-style operation.”
Since taking office last year, Mr Buhari has vowed to tackle the rampant official corruption, which has stunted economic growth across the country, the BBC’s Martin Patience in Nigeria says.
As part of that campaign a number of former senior officials have been charged. But their cases have largely stalled in the courts.
Widespread corruption within the legal system makes it extremely difficult to convict powerful individuals, the correspondent adds. -BBC