Construction of the new £250m facility will start next summer, subject to planning approval. It will be the first prison in North Wales.
The government has also started feasibility work on a second large prison to be built in the southeast of England.
And it has confirmed opening dates for the new house blocks – mini-prisons – being built to create 1,200 new places at four sites across England.
The feasibility study for the proposed second big new prison is focusing on the possibility of replacing the existing Feltham Young Offenders Institution with a large new adult prison and a new youth facility on adjoining sites in West London
At the same time the Ministry of Justice is moving to close four older prisons that are either too expensive to run or need substantial refurbishment. It is also changing the role of three others.
Justice secretary Chris Grayling said: “This is the latest part of our plan to modernise our prisons, bring down costs, but to make sure that by the next election we still have access to more prison places than we inherited in 2010. The Feltham site in West London is a very large one, and is an obvious option for a major new project to help meet the challenges we face in London and the southeast.
“I’m also really pleased that we have reached agreement on the new prison in Wrexham. It will provide a real boost to the local economy in North Wales over the next few years, which is one key reason why the Chancellor has made sure we have the money for the project.
“Of course the reorganisation of our prison estate which we are undertaking means some difficult decisions – but we have to make sure that we have modern, affordable prisons that give the best opportunity for us to work with offenders to stop them committing more crimes when they leave.”
Secretary of state for Wales David Jones said: “The case for a prison in north Wales has always been strong, which is why I am delighted that Wrexham has been selected as the preferred site for the newest addition to the prisons estate.
“The construction of this much needed facility will bring with it considerable economic benefits for local businesses, and create up to 1,000 employment opportunities across the region. It will facilitate the rehabilitation of offenders by making them more accessible to their families, legal advisers and the probation service, enabling a smoother transition back into the community. It will also benefit prisoner welfare by allowing Welsh speakers more opportunity to speak the language in an environment where its cultural significance is understood.”
By closing uneconomic prisons at Blundeston, Dorchester, Northallerton and Reading, it is anticipated that a further £30m a year will be cut from the overall prison budget.
HMP The Verne will be converted into an immigration removal centre. HMP Downview will change function to hold male rather than female offenders and the Warren Hill young offenders institute will switch to an adult male prison.
Discussions will also begin to end the lease on HMP Dartmoor. Final decisions on the site are some way off as the lease has a 10-year notice period but the age and limitations of the prison mean that it does not have a long-term future in a modern, cost-effective prison system, the government said.