The attack claimed by the Islamic State (IS) group began on Sunday evening when car bombs were detonated by armed men at the entrance to the prison.
Eight of the attackers were killed in a fight lasting almost 20 hours, a spokesman for Nangarhar province said.
It is estimated that up to 300 prisoners are still on the run.
At the time of the attack, 1,793 prisoners were in jail – most of them Taliban and IS fighters, a security source told AFP news agency. It was not immediately clear whether the attack had been staged to free certain prisoners.
Those accused of common crimes were also held in prison.
According to the province spokesman, 1,025 escaped prisoners were returned to prison, and 430 were rescued. More than 50 people were injured.
Prison breakouts are a well-known tactic for fighters in Afghanistan.
But the well-coordinated group attack on a prison complex in Jalalabad is one of the largest and most complex attacks claimed by IS in the country.
Eastern Afghanistan has been the main stronghold of the IS since it announced the establishment of its Khorasan province (ISKP) – an IS branch in the Afghanistan-Pakistan region – in January 2015.
The IS had been weakened by several military operations by the Afghan government, the Afghan Taliban and the US forces over the past two years.
Both the recent deadly attacks claimed by the IS show that the Afghan government and the Afghan Taliban have exaggerated the defeat and even the elimination of the group.
Despite recent losses of territory and fighters, the IS still has sleeper cells, especially in the cities, especially in Kabul and Jalalabad.
By carrying out such attacks, the IS wants to prove its resilience and give the impression that its network and capabilities are still intact.
The attack is also part of the newly appointed ISKP leader’s efforts to prove his legitimacy, strengthen the morale of his supporters and possibly attract new recruits. In a recent statement, he assured the IS prisoners that their colleagues would not “sit idly by”.