A deed in lieu of foreclosure is when a homeowner who cannot keep up with payments voluntarily transfers ownership of the property to the lender to avoid formal foreclosure. In exchange, the lender typically releases the borrower from the mortgage debt, though terms and credit impact vary by agreement.