The Victory Medal belonged to Pte William John Boaden of the 3rd Battalion Devonshire Regiment.
It was found in a farmer's field in Porthcawl by a team of metal detecting enthusiasts.
Researcher Stephen Lyons then tracked down Pte Boaden's family in Tiverton, Devon, where he was born in 1897.
But it is still not known how the medal came to end up in the field.
Pte Boaden signed up on the outbreak of the First World War aged 17.
His regiment served in France and Belgium, Mesopotamia, Salonika, Macedonia, Egypt, Palestine and Italy.
The medal is badly damaged but Pte Boaden's name and regimental number are still visible.
Chris Jeffreys made the discovery after sitting down on a fallen tree to take a break from metal detecting.
"I didn't have many finds that day," he said, until his detector picked up a "beautiful signal" around the tree.
"The area had been covered dozens of times before, so whether the tree falling disturbed something I don't know.
"It's the first medal I've found," he added. "I was overjoyed."
Keen to unravel the mystery of how the medal ended up in the field, Mr Jeffreys and his fellow metal detecting enthusiasts appealed for help to find out what happened to Pte Boaden.
A First World War expert based in Cwmcarn, researcher and historian Stephen Lyons answered the appeal.
Following a tenacious and at times pain-staking research, he tracked down daughter-in-law Moira Boaden and his grandson Stephen Boaden living in Tiverton, Devon.
Mr Jeffreys recently met them to present the medal.
Mrs Boaden said she was "delighted" as she never knew of its existence and that the family "will treasure it".
"It's so interesting hearing all the history of my father-in-law."
Stephen Boaden said he had nothing of his grandfather's, not even a photograph, until recently.
"It was a very nice surprise," he said.
"To find out so much information about what he went through and who he was - it gives him a personality."
He added that the medal was not just something that belonged to his grandfather, but was "evidence of his service to his country."

It comes after the 24m (80ft) poles appeared close to the MacLeod House hotel and near the clubhouse at Mr Trump's Menie site.
There have been concerns the poles are too large and bids for planning permission have now been submitted.
The US presidential candidate's resort has been a focus for local protest.
Mr Trump has called the links course one of the finest in the world.
A legal challenge by the tycoon over plans for an offshore wind farm on the Aberdeenshire coast was rejected by the UK's Supreme Court.

The blast happened in the early hours of Monday at the Weston Road branch in Long Ashton, near Bristol.
Cash was stolen and three men were arrested on suspicion of causing an explosion with intent to endanger life.
Two men, aged 22 and 24, from Southport near Liverpool have been held on suspicion of the same offence.
Villagers described the attack on the building as "shocking", "insane" and "a hideous act".
Owners David Andrews and Andrew Crabb said they hope to reopen "as soon as possible" after assessing the damage.
Many villagers posted their support on the store's Facebook page.

Ramunas Macnoris is charged over separate gun attacks in Newry, County Down, early last Thursday when two men, both aged 32, were shot in the legs.
The 26-year-old, of Lambfield House, Dungannon, was also charged with having a firearm.
The accused, who is originally from Lithuania, was remanded in custody,
A detective objected to bail, saying police feared he would reoffend, flee the country or interfere with witnesses.
However, a defence lawyer argued he could be released under stringent conditions, including staying 40 miles away from Newry.
Refusing bail, the judge said there were "genuine fears" about the concerns raised by the detective.
The accused is due to appear in court again via videolink next month.
A war medal found in a field in Bridgend county has been returned to its rightful owners almost a century after it was awarded.
[NEXT_CONCEPT]
Donald Trump's Aberdeenshire golf course has been forced to apply for retrospective planning permission for two large flag poles.
[NEXT_CONCEPT]
Two more people have been arrested over an explosion at a post office by thieves attempting to steal a cash machine from its front.
[NEXT_CONCEPT]
A man charged with attempted murder and kidnapping is allegedly part of an international drugs smuggling gang, a court has heard.