Media playback is not supported on this device
Scotland scored twice in three minutes in the final quarter to win 2-1 in Glasgow.
James Carson gave Wales the lead from a penalty corner, but Ben Cosgrove and Alan Forsyth won it for the hosts.
Earlier the Wales women's team lost 3-0 to Italy to finish fourth at their EuroHockey Championships in Cardiff.
Chiara Tiddi, Celina Traverso and Federica Carta scored the Italian goals.
"We came out fighting for the bronze today but just couldn't hit the line," midfielder Sian French told BBC Wales Sport.
"We'll keep on pushing as a team for the next two years and we'll come back even stronger next time."
Because two teams get promoted from the B Division, Wales's men will compete in Europe's top tier at the next EuroHockey Championships in 2019.
On Friday, Wales women's hopes of rising into Europe's top tier were shattered in a 2-1 defeat by Russia.
Wales' men secured promotion to their top tier by beating France 4-3 in their semi-final in Glasgow.
Wales women had beaten Austria and Poland, but lost to Belarus on the way to the semi-finals.
Neither Wales side has been in the EuroHockey A Division since it was reduced to eight teams more than a decade ago.
The nation's women were playing in the third tier just four years ago.

The blaze started at the ICL UK Boulby mine at 00:30 BST on 13 April, 1,100m (3,600 ft) under the sea bed and five miles (8km) from land.
Seven workers were taken to hospital and treated for smoke inhalation.
The Health and Safety Executive (HSE) said a notice had been served in relation to the underground fire.
More than 100 staff were underground at the time, 11 of whom were temporarily unaccounted for.
Polystyrene blocks are believed to have caught fire in the mine.
A spokesman for ICL UK, said: "We have been working closely with HM Mines Inspectorate in the investigation into the recent incident.
"Safety is always our first priority and we are fully committed to working with the inspectorate in order to identify ways in which procedures can be improved.
"We will, of course comply with all the measures set out in the improvement notice."
The company has until 27 June to comply with the notice.
The HSE said the investigation was ongoing.
One of Europe's deepest mines, the site employs about 1,100 people.
Last year, the company announced it was shedding hundreds of jobs as part of a "new business strategy" to produce fertiliser polysulphate.

A lawyer for the former Cleveland Browns quarterback told the Associated Press news agency that prosecutors had told him a charge was coming.
A Texas grand jury has agreed a misdemeanour assault charge for family violence, the lawyer said.
Colleen Crowley says he confronted her at a Dallas hotel and hit her as they drove back to Fort Worth.
The Class A misdemeanour carries up to one year in jail and a $4,000 fine.
Lawyer Robert Hinton told AP the charge was expected on Tuesday and he expected a judge to set bail.
Despite success playing football as a university student, Manziel - nicknamed "Johnny Football" - has struggled with substance abuse and personal issues in the professional league.
Manziel was released from Cleveland Browns in March.
Wales men's hockey team suffered an agonising late defeat by Scotland in their EuroHockey Championships II final.
[NEXT_CONCEPT]
A potash mine in East Cleveland has been issued with an improvement notice after a fire broke out hundreds of metres below the sea bed.
[NEXT_CONCEPT]
Troubled NFL quarterback Johnny Manziel is expected to be charged over an alleged assault on his ex-girlfriend.