Abdelkrim Hassane, 41; Khaled Belkacemi, 60; Aboubaker Thabti, 44; Azzeddine Soufiane, 57; and Ibrahima Barry, 39, were all shot in the place of worship.
As he read out portions of his 246-page ruling over several hours, Huot said the attack was a hate crime motivated by a "visceral hatred for immigrants who are Muslim", local reporters said from the courtroom.
The January 2017 shooting, which Prime Minister Justin Trudeau denounced as a "terrorist attack", provoked debate over the treatment of new arrivals at a time when a growing number of migrants crossed from the United States into the province of Quebec.
The killer's "highly premeditated" attack would be "written in blood" in Canadian history as one of the country's worst tragedies, Huot said in court.
A first-degree murder conviction in Canada carries an automatic life sentence with no chance of parole for 25 years.
"It's very hard, I would imagine, to really find true closure on a day like today", she said, adding that people's hearts were with the families of the victims and the entire Quebec City mosque community.More news: Thailand's king condemns bid by sister to become PM
More news: Prince Philip, 97, Gives up Driver's License after Crash
More news: Huawei would accept European Union 'supervision'
He will be allowed to go before the Parole Board of Canada after serving 40 years, ruled Superior Court Justice François Huot on Friday - in a decision that left survivors and families feeling "disappointed", "dismayed" and "gutted", CBC reported.
Before the sentence was handed down, the NCCM said more work needs to be done to address Islamophobia in Canada.
Six men were killed and five were seriously injured.
A 2011 legal change allows Canadian judges to hand down consecutive sentences in the case of multiple murders.
Like the rest of the world, Islamophobia has become a problem in Canada. During a sentencing hearing last June, the conversation began to shift to the appropriate way to punish a crime that was, in many ways, unprecedented in Canadian history. In a statement read in court, he said he was "neither a terrorist nor an Islamophobe", but rather someone who was "overcome by fear, by negative thoughts and a sort of awful kind of despair".
He told police investigators that he believed a terrorist attack was imminent and felt he "had to do something". They called a 150-year sentence the equivalent of a "death sentence by imprisonment" and said it would be "contrary to human dignity".
But Bissonnette's lawyer, Charles-Olivier Gosselin, portrayed his client as an anxious and fragile man who deeply regrets his actions and is not beyond rehabilitation.