On the second day of their tour, Charles and Camilla laid a wreath at a memorial in Trenton, Ontario, alongside a handwritten note by the prince.
In total 158 people from Canada died in the conflict which started in 2001.
The royal couple also met veterans and serving members of the armed forces.
The couple took part in a minute's silence at the memorial to pay tribute to those who lost their lives.
At the Trenton Canadian Forces base, the duchess met personnel and their families from the Queen's Own Rifles of Canada. She is the unit's colonel-in-chief.
One of them was Adam de Bartok, a warrant officer who completed several tours of Afghanistan.
He said: "She asked my wife whether she sat at home and worried. I said 'it goes with the territory'.
"I think she understood, she's from a military family. She said 'that's why you're so wonderful' and she was proud to wear the [regiment's] brooch.
"It was a huge honour to actually meet her in person, we have her photograph everywhere."
Meanwhile, Prince Charles saw a search and rescue operation by the soldiers.
The couple began their three-day trip visiting an Inuit settlement near the Arctic circle on Thursday.
They listened to traditional throat singing performed by local people and watched craft demonstrations involving silver jewellery.
The prince and duchess both tried on a pair of snow goggles, to which the prince joked to his wife: "They match your sparkling personality."
The Prince of Wales and the Duchess of Cornwall have honoured Canadian soldiers who died while fighting in Afghanistan.