The deal will see more than 23,000 residential mortgage customers transfer to Lloyds-owned business Halifax in a move cementing the bank's position as Britain's biggest lender.
The sale of the portfolio, which has a lending balance of around £3.7bn, is expected to be completed by the end of March next year.
It comes after Tesco Bank said in May it was stopping new mortgage lending and put the business up for sale amid challenging market conditions.
Gerry Mallon, Tesco Bank chief executive, said: "Our focus is on how we best serve Tesco customers and align our resources effectively to their needs, while ensuring that our offer remains sustainable in the long term.
"As a result, we made the decision to move away from our mortgage offering.
"Our priority throughout has been to complete a commercially acceptable transaction with a purchaser who will continue to serve our customers well."
But there has been concern among Tesco Bank's home loan customers that the sale will spell the end of their ability to earn Tesco Clubcard loyalty points through mortgage payments.
Lloyds beat high street competitors including Santander and Royal Bank of Scotland to secure the portfolio.
Mortgage lenders have been hit by intense competition in the market, which has in part been caused by recent banking rules to ring-fence retail operations from investment banking business.
The competition has seen borrowers benefit from lower rates, but has put pressure on smaller lenders and challenger banks.
Vim Maru, group director of retail at Lloyds Banking Group, said: "This is a good deal for the group, our shareholders and Tesco's mortgage customers.
"We believe our Halifax brand will make a good home for these customers and we look forward to welcoming them to the group."
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies