Officials from Staffordshire County Council and the university said the historic building, in the town centre, would become an information centre for prospective students.
A number of courses will also be taught there.
The courtroom and an art gallery housed in the Grade II-listed building will remain open to the public.
Campaigners drew up a petition after the council announced it was considering closing the exhibition space to save money.
Stafford Shire Hall is to become an outpost of the University of Wolverhampton.