It was the first major protest since the signature last month of a power-sharing deal between the military and civilian groups for a three-year transition leading to elections, following the overthrow of former president Omar al-Bashir in April.
Police had blocked protesters in central Khartoum about 200 meters from the palace, but they surged past a barbed wire barrier to the palace gates, a Reuters witness said.
They called for the appointment of a new head of the judiciary and a new public prosecutor, steps they hope will lead to the prosecution of security forces blamed for deaths during demonstrations against Bashir and against the military council that initially replaced him.
"Blood for blood, we won't accept blood money," the crowd chanted, repeating a slogan first used during protests against Bashir that began in December.
Some also called out "The people want a new chief justice," and "Yes to an independent judiciary."
"We demand justice for the martyrs, and for those who killed them to face justice," said one young female protest organizer.
In June, the military council dismissed public prosecutor Awaleed Sayed Ahmed Mahmoud and named an interim replacement.
The move came shortly after Mahmoud had announced that he would investigate the killing of dozens of people in the early hours of June 3, when security forces cleared a sit-in outside the Defence Ministry.
Authorities have acknowledged 87 deaths resulting from the violence that day, but protest groups have put the toll at nearly 130.
Justice over those deaths and other killings during crackdowns on anti-Bashir protests has been a key demand of the civilian parties that negotiated the power-sharing deal.
After the deal a joint military-civilian council was formed, followed by a government of technocrats that was sworn in this week.