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.
Buhari's first year: Five ways Nigeria has changed
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, our correspondent adds.

Proud went under 46 seconds for the first time, beating his own record in the men's 4x100m freestyle with 45.97.
Aimee Willmott won her fourth medal with 400m individual medley gold.
Lizzie Simmonds, who set a British record in the 100m backstroke on the opening night, took gold in the 200m in a season's best 2:00.91, just outside her own British record.
Proud, 21, of the Plymouth Leander team, broke Mark Foster's 14-year-old short-course 50m freestyle British record on the opening day, clocked 46.69 in the 100m freestyle and on Sunday added the 50m butterfly with a time of 22.39 seconds.
Willmott, 22 - who also won gold in the 200m IM and 400m freestyle, plus silver in the 200m butterfly - captured the 400m title in 4:28.26, an impressive six seconds ahead of the rest of the field.
Stockport Metro's Liam Selby took gold in the men's 50m butterfly with a narrow victory in a time of 23.56.
Anna Hopkin of Bath University lowered the personal best time she posted in the morning heats to win 50m freestyle gold in 24.44.
A superb anchor leg from Rebecca Turner guided the City of Sheffield, also featuring Maya Westlake, Darcy Deakin and Ellie Faulkner, to gold in the women's 4x100 freestyle relay in 7:53.70.
Calum Tait finished more than a body length ahead of the next placed swimmer in the men's 200m breaststroke, posting a personal best 2:05.42.
The women's 200m freestyle final went down to the final touch but it was Loughborough University's Sophie Smith who touched first to take gold in 1:56.03, only 0.02 seconds outside her lifetime best.
In the men's 200m freestyle final, Loughborough University's Adam Barrett won in a season's best 1:43.72.

Homes in Elnor lane, Whaley Bridge, Derbyshire, had to be evacuated following reports of the explosion at about 22:30 BST on Wednesday.
An army Explosive Ordnance Disposal team attended the address early on Thursday morning. No-one has been reported injured.
The man is being held on suspicion of causing an explosion to endanger life.
Live updates from the East Midlands
High Peak councillor Andrew Fox, who lives nearby, said: "We heard a large explosion around 10:30pm, we rang the police and reported our concerns."
Residents in Elnor Lane were asked to leave their homes during the investigation but have since returned.
One house remains cordoned off by police. Police and fire investigators are trying to establish the cause of the explosion.
Nigeria's security agency says it has seized $800,000 (Â£645,200) in cash in raids targeting senior judges suspected of corruption.
[NEXT_CONCEPT]
Ben Proud claimed his fourth British record of the ASA National Winter Meet on the final day in Sheffield.
[NEXT_CONCEPT]
A man has been arrested following a "large explosion" at a house in a village.