It is illegal to repay a mortgage with a loan. The loan funds shall not be used to repay the mortgage loans stipulated in the loan contracts. The loans that most people apply for are generally consumer loans or business loans. Neither loan can be used to repay the mortgage. Once discovered by the bank, the bank may require the user to pay off all the loan funds in one lump sum.