Defense Secretary Liam Fox accompanied the prince to Camp Bastion in Helmand province, Sky News reported.
The queen led the traditional Remembrance Sunday event at the Cenotaph in London.
"Remembrance Sunday is a time when the entire country stops to recognize the sacrifices made by the armed forces on our behalf," Fox said.
"I am extremely proud that Prince William and I could come to Camp Bastion to stand alongside the men and women serving in Afghanistan today.
The pair also visited British and other troops from the international force. The prince left the country shortly after the service.
The chief of the defense staff, Gen. David Richards, told the BBC: "The relationship between the royal family and the armed forces is very precious. ... It means a huge amount."
Celebrity Families of 2014 [PHOTOS]