Mortgage is considered haram if it involves usury.

Shaikh Salih al-Fawzan hafidhuhallah was asked:

Question:

In regards to mortages taken from banks, what is the legislated view in your opinion about it oh Virtuous Shaikh?

Answer:

What is the intent of mortgage? Is the intent buying the mortgage from the bank? Or is the intent buying the mortgage from outside the bank and pay for it using money from the bank? If the intent is buying the mortgage from the bank, then this is allowed if the mortgage is present with the bank, if (on the condition that) he buys it with money at the present or by deferred payments in installments or at one time. As for buying the mortgage from outside the bank and borrow money from the bank, then this is allowed without an increase. If the bank is prepared to give him a goodly loan (Qard Hasanah), then this is good from the bank or other than them. As for if they will not give it to him except with an increase, then this is haram and usury and not allowed. Yes”

[Reference]

The most common form of mortgage in Canada is the five-year fixed rate closed mortgage, as seen here, which involves interest. So it would not be permitted. Unless someone buys a mortgage as described by the Shaikh without usury, then it is not allowed.

There are a lot of Muslims who are under the impression that it is allowed to buy a mortgage with usury in a non-Muslim land according to the view of Abu Hanifa and his students. Thus, you see many local Hanafi Imams and masaajid allowing this. This is a weak opinion and is infamously popularized by the Yusuf Qardawi in his book Fiqh of Muslim Minorities. The majority of the Scholars of the Salaf considered usury haram in Muslim lands or non-Muslim lands and it is a major sin. Allah the Exalted said:

وَأَحَلَّ اللَّهُ الْبَيْعَ وَحَرَّمَ الرِّبَواْ

whereas Allah has permitted trading and forbidden Riba.

[2:275]

And He said:
يأَيُّهَا الَّذِينَ ءَامَنُواْ اتَّقُواْ اللَّهَ وَذَرُواْ مَا بَقِىَ مِنَ الرِّبَواْ إِن كُنتُمْ مُّؤْمِنِينَ

فَإِن لَّمْ تَفْعَلُواْ فَأْذَنُواْ بِحَرْبٍ مِّنَ اللَّهِ وَرَسُولِهِ

O you who believe! Be afraid of Allah and give up what remains (due to you) from Riba (usury) (from now onward), if you are (really) believers. And if you do not do it, then take a notice of war from Allah and His Messenger

[2:278-279]

If someone took a mortgage like this, what do they do with the house?

Shaikh Abdul-Muhsin al-‘Abbad hafidhuhallah was asked:

Question:

A man took a usurious loan and built a house and now repented to Allah from this sin. What does he do with the house he built?

Answer:

He seeks the forgiveness of Allah and benefits from the house. If he did not know that what he did was usury, then he is excused of that and pardoned. This is because he entered a contract into something he did not know was usury. However, if he knew it was usury, then no doubt he is sinful. He made a contract upon clarity and fell into prohibition upon knowledge and insight. So he seeks the forgiveness of Allah and repents to Allah from what happened and benefits from his house

[Sharh Ibn Majah no. 277]

And Allah Know Best

Faisal Ibn Abdul Qaadir Ibn Hassan
Abu Sulaymaan