Her Majesty’s Courts Service (HMCS) said that the Lincoln Crown Court will not move out of the castle grounds because it would be too expensive.
Plans were in place to move the Crown Court out of the building, which would have been used as a visitor centre instead.
Lincolnshire County Council wanted to carry out a £19million revamp of the castle, including turning the court building into a Magna Carta exhibition.
Campaigns were in place this year to pressure the move of the historic 13th century charter, currently on display in Lincoln Castle.
But HMCS said building a new court building somewhere else in Lincoln would not represent good value for money for taxpayers.
“Her Majesty’s Courts Service was approached by Lincolnshire County Council and asked to vacate the current crown court at Lincoln in order for the council to create a Magna Carta visitor centre,” an HMCS spokesperson told BBC Lincolnshire.
“We looked at a number of alternatives including moving the work within Lincolnshire or various options involving moving the work to Nottingham, Grimsby, Peterborough and Huntingdon.
“None of these options was considered achievable or affordable without significant impact on court users and the public,” the spokesperson concluded.