The provincial government spokesman, Attaullah Khogyani, said on Saturday that the explosion was reported in the third police district of Jalalabad city but that the exact type and target was unclear.
"At least some of the students, most of them from Nuristan province in eastern Afghanistan, had been evacuated from the building", the spokesman added.
Smoke could be seen rising from the site as security forces and ambulances rushed to the scene, which was blocked off to traffic. There was no immediate word on casualties.
The attack is the latest in a series to have hit Jalalabad in recent weeks, causing dozens of casualties.
There was no immediate claim of responsibility but recent attacks have been claimed by Islamic State, which has a stronghold in the surrounding province of Nangarhar, on the border with Pakistan.
No one claimed responsibility for the attack.
Both the Taliban group and ISIS have carried out numerous attacks in Nangarhar Province.