The Additional Session Judge Rafaqat Awan was also killed during firing before the suicide attack.
"Loud explosion was heard followed by gunfire", an eyewitness said.
He also said that gunmen entered every chamber and fired at will.
Suicide attackers threw grenades and opened indiscriminate firing in the premises of a local court in Pakistan's federal capital.
"The two gunmen when challenged blew themselves up. This was a suicide attack," Inspector General of Police Sikandar Hayat told reporters.
Dr Ayesha of Pakistan Institute of Medical Sciences confirmed that 11 people were dead and over 25 were brought in as injured.
The attack comes just days after Interior Minister Chaudhry Nisar Ali Khan said Islamabad was a safe city.
This is the first terrorist attack in the heart of Islamabad in a long time.
A large number of expats stay in the F-8 area of the capital where the attack took place.
Eyewitnesses said the gunmen, first threw grenades and then opened indiscriminate firing.
The incident happened around 9 AM and firing continued for nearly 15 minutes.
Rangers personnel and commandos secured the area after the attack and carried out search operations.
Police also reportedly reached late at the blast site.