US President Donald Trump hailed the couple's freedom after five years held in the lawless Afghan-Pakistan border region by the notorious Haqqani network.
And he suggested the rescue was the result of his tougher diplomatic stance against Pakistan, which Washington has been pressuring over its support for some armed Islamist groups.
"The Pakistani government's cooperation is a sign that it is honoring America's wish that it do more to provide security in the region," Trump told reporters.
"They worked very hard on this, and I believe they're starting to respect the United States again," he said, adding that "a lot" of other nations were also showing greater deference to the US.
Caitlan Coleman and Joshua Boyle were kidnapped during a backpacking trip in Afghanistan in 2012, and had three children while in captivity.
A US military official said American forces were not involved in any rescue, but that a medical team had been able to meet the family and stood ready to fly them home if needed.
Another military official told AFP the couple was hesitating to board a US military jet in Pakistan over the Canadian husband's concerns he could face American scrutiny for links to a former Guantanamo captive.
In 2009, Boyle was briefly married to Zaynab Khadr, the sister of Canadian-born Omar Khadr who spent a decade at Guantanamo.
But the official said Boyle did not risk any US repercussions.
"It is not in our intention to do anything like that. We are prepared to bring them back home," the official said.
Trump identified the captors as the Haqqani group, whose head, Sirajuddin Haqqani, is also the Afghan Taliban's deputy leader.
This faction has long been suspected of having links with Pakistan's shadowy military establishment.
In 2011, the chairman of the US Joint Chiefs of Staff at the time, admiral Mike Mullen, described the Haqqani as a "veritable arm" of Pakistani intelligence.
Pakistan has been under increased pressure from Washington to crack down on alleged militant sanctuaries inside its borders after Trump lambasted the country in a televised address in August.
During the speech, Trump accused Islamabad of sheltering "agents of chaos" and suggested ties with Pakistan would be adjusted immediately but offered few details.
US Defense Secretary Jim Mattis and Secretary of State Rex Tillerson are expected in Pakistan in the coming weeks on separate visits, according to US and Pakistani sources, to maintain pressure on a country that was a Cold War US ally.
The Haqqani network has been accused of masterminding several high-profile terrorist attacks in the Afghan capital, including a massive truck bomb on May 31 that killed some 150 people.
They have been known to kidnap Western hostages and smuggle them across the Afghan border into Pakistan, as appears to have been the case with Coleman and Boyle.
The Pakistani military said the hostages had been "recovered... from terrorist custody through an intelligence-based operation by Pakistani troops."
They were found in Kurram district, part of Pakistan's semi-autonomous tribal belt, where militants such as the Haqqanis operated with impunity until the army intensified an operation there in 2014.
"US intelligence agencies had been tracking them and shared their shifting across to Pakistan on 11 Oct 2017 through Kurram Agency border," the Pakistani military said.
Kurram borders Nangarhar and Paktia provinces in Afghanistan. Both are riven by militancy, with the Islamic State group gaining a foothold in Nangarhar and Paktia seen as a Haqqani stronghold.
The head of US forces in the region, CENTCOM chief General Joseph Votel, said Pakistan recognizes how seriously the United States takes the safety of its citizens.
"They acted quickly and very responsibly to take control of these persons and again to effect their return," he told reporters at CENTCOM headquarters in Tampa, Florida.
Boyle and Coleman appeared in a hostage video in December last year with two of their children pleading for their release.
The video was released after rumors swirled in Kabul that the government was planning to execute Anas Haqqani, son of the Haqqani network's founder, who has been held since 2014.
Canada's foreign affairs minister, Chrystia Freeland, expressed relief at the release.
"Joshua, Caitlan, their children and the Boyle and Coleman families have endured a horrible ordeal over the past five years," she said in a statement.
Afghanistan is rife with militants and organized criminal gangs who stage kidnappings for ransom, targeting wealthy Afghans and foreigners, who have been ferried over the border.
The Taliban are also thought to be holding American Kevin King and Australian Timothy Weekes, professors at the American University of Afghanistan who were dragged from vehicles in Kabul by gunmen.