Judge Mutaz Khafagi, who had also sentenced Muslim Brotherhood leader Mohamed Badie to life in prison, was in his first-floor apartment in the suburban Cairo building but was not injured in the explosions, a police official said.
Khafagi had sentenced 12 men to death in August 2014 after convicting them of murdering a police general in the town of Kerdasa near Cairo during a police crackdown targeting supporters of Mohamed Morsi, the Islamist president ousted in 2013.
Building security caught one of the "terrorists" who planted the bombs on Sunday after they emerged from a taxi, the police official said.
The other suspect escaped and remotely detonated the bombs after a crowd of onlookers gathered outside the house, the official said.
"The explosions damaged the facade of the judge's home... and broke the windows of three cars parked outside, including the judge's car," the officer said.
One of the four wounded civilians was taken to hospital with a neck injury and the others sustained minor wounds, a health ministry official said.
The government unleashed the crackdown after army chief Abdel Fattah al-Sisi, who has since become president, overthrew Morsi following mass protests demanding the Islamist's resignation.
