The retailer acquired the former Vaux Brewery plant in 2001 for £13m. But its original plans for a 110,000 sq ft superstore alongside other shops and homes were opposed by Sunderland City Council.
Tesco submitted different plans but a legal battle followed and, despite public inquiries, the deadlock could not be broken.
Now Tesco has agreed to sell the site to regional development agency One North East. Neither side would say how much the deal was worth.
"We have been working closely with Sunderland City Council and other public sector bodies to resolve the status of the Vaux site and this agreement reflects a new spirit of partnership," said Tesco corporate affairs manager Doug Wilson.