There are a couple of ways to end or transfer responsibility for a mortgage.
First, we should recognize that debts and financial obligations can not be transferred through a deed. That is one of the reasons mortgages are written such that the real estate serves as security for the loan but the loan proceeds are lent to the borrower as cash via a promissory note or other instrument. If you use a quitclaim deed to transfer ownership of your property you will still be responsible for your mortgage unless you end or transfer responsibility by one of the following methods or some other acceptable method.
You can transfer the mortgage to someone else, probably the grantee of a deed that wants to purchase the home. In order to transfer a mortgage to the grantee, you'll have to convince the latter to refinance the loan in his/her name. And, at the time of refinance closing, you can sign on a quitclaim or grant deed in order to transfer the property to the grantee. Alternatively, you can transfer the title first and then have the grantee refinance the mortgage in his name but this is not advisable if your goal is to relieve yourself of the mortgage responsibility. However, if you decide to go that route, make sure you get a guarantee that the grantee will refinance, in writing, before executing the deed.
Another method of removing yourself from the mortgage responsibility is novation. Novation is the substitution of one party in a contract for another. Novation is heavily dependent on the lender's willingness to make the substitution. Unlike a refinance, novation does not retire the debt and the lender is still at risk. However, all things being equal, lenders prefer mortgages on owner occupied homes as these mortgages have a much lower default rate. Unlike refinancing where the present mortgage is paid off by the new loan and the present lender has no further risk (unless they refinance their own loan), novation simply changes who is responsible for the loan which may prove to be a riskier proposition for the lender. Novation can not occur without the express consent of the lender.