The 45-acre site used to be part of a Ford factory
Plans for a prison in Dagenham with space for 1,500 inmates have been dropped because the cost of protecting it from flooding would be too high.
A Ministry of Justice spokesman said it had "carefully considered" the flood risk before coming to its decision.
Residents who fought a long campaign against the building of the jail - dubbed a 'giant prison' - at the site of an old Ford factory are jubilant.
Dagenham MP Jon Cruddas called it a "huge victory" for people power.
The jail was planned after Justice secretary Jack Straw announced in April 2009 that five new 1,500-place prisons would be built to meet the government's goal of increasing total prison capacity to 96,000.
Plans to build 2,500-capacity 'titan' prisons were abandoned in favour of the five 'giant prisons'.
By comparison, Brixton Prison in south London houses 798 inmates.
The first two of the 1,500-place prisons were to be in Dagenham and at Runwell, near Chelmsford, Essex. Officials have said the Runwell prison remains "on track".
A Ministry of Justice spokesman said: "The Ministry of Justice carefully considered the planning risks, in particular the potential cost of mitigating flood risk.
"We have also taken into account the views expressed by local residents."
He continued: "There is a significant shortfall of prison places in London, so sites in and around London remain a priority.
"We are committed to providing more prison places to ensure that the most dangerous, serious and persistent offenders are locked up."
Mr Cruddas MP said: "We successfully made the argument that it was the wrong place for such a project.
"This was a huge victory for people power - thousands of local people signed up to the campaign and said no to Dagenham prison."