In a statement, the Royal Canadian Mounted Police said the reptile had strangled two boys, aged five and seven, in Campbellton.
The boys were staying overnight at a friend’s apartment above the pet shop.
Police believed the snake slipped out of its cage overnight and travelled through the ventilation.
BBC says the serpent has been captured by police.
Officers were called to the address on Monday morning where the two boys were found dead, said a police statement. The flat was located above the Reptile Ocean exotic pet store.
“The preliminary investigation has led police to believe that a large exotic snake had escaped its enclosure at the store sometime overnight and got into the ventilation system, then into the upstairs apartment,” said the statement.
Post-mortem examinations will be performed on the two boys, thought to be brothers, on Tuesday. No charges have been laid so far.
Campbellton’s deputy mayor, Ian Comeau, said the incident was a “tragedy.”
“The city is in shock,” he added.
Experts say attacks by exotic snakes are extremely rare.