Captain Walter Barrie, of Lanark, was playing in a match on Sunday between British soldiers and members of the Afghan National Army (ANA) at his base when he was shot at close range in the Nad-e Ali district of Helmand province.
News of the killing came after the Queen led the nation in honouring the fallen, as the country fell silent to remember its war dead.
His wife Sonia described her husband as a "great man and amazing father" with the soldier also survived by his son, Callum, 15.
The body of Capt Barrie, of The Royal Scots Borderers, 1st Battalion The Royal Regiment of Scotland, was flown into RAF Brize Norton in Oxfordshire, where the Union Flag-draped coffin was carried from the plane with full military honours.
A private service was held on the base for his family who were too upset to attend a ceremony held at the memorial garden on the outskirts of Carterton.
Members of the public and the Royal British Legion joined Capt Barrie's colleagues from the Royal Regiment of Scotland who stood in silence while a bell began to toll as the cortege approached them on its way to Oxford.
Some of the men stepped forward as the hearse paused briefly next to a Union Flag hung at half-mast and placed flowers on top of the car.
As the cortege pulled away there was a round of applause from members of the public who came to pay their respects.
Major Jimmy Law, of the Royal Regiment of Scotland, had known Capt Barrie for over 20 years.
He said: "Walter Barrie was professional, diligent and more importantly, he was just a brilliant bloke, with a great family.
"He loved his Glasgow Rangers Football Club, and he was really like a soldiers' soldier. All the blokes respected him and he really added a great deal of value every day, he was just 100% professional."
Rangers will wear black armbands on Saturday against East Stirlingshire, with club manager Ally McCoist earlier paying tribute to the fallen soldier.
Major Law said the fact his friend was killed on Remembrance Sunday made his death even more poignant. He said that while only a small contingent could make the repatriation he expects hundreds to pay their respects when Capt Barrie is laid to rest in Scotland.
Capt Barrie had been mentoring and advising a brigade of the ANA to take over security in an area of southern Afghanistan. He had served for 25 years, including tours of Iraq, Bosnia, Kosovo, Northern Ireland and Afghanistan in 2008.
The "green-on-blue" death brings the number of British servicemen killed by Afghan soldiers or police to 14 this year, compared to one in 2011, three in 2010, and five in 2009. At least 54 international troops have died due to such attacks.
Capt Barrie's wife said: "Captain Walter Barrie was a great man, a doting and amazing father and a fantastic husband. He was much loved and will be missed by many."