Lt Donald Mackintosh, who served with the Seaforth Highlanders, died in the Battle of Arras in 1917.
His actions led to the posthumous award of a Victoria Cross.
Arras was fought from 9 April to 16 May 1917 and marked the beginning of the spring offensive on the Western Front.
An unusually high number of Scottish soldiers took part in the battle and 18,000 of them were killed.
The official citation marking Donald Mackintosh's VC reads:
"For most conspicuous bravery and resolution in the face of intense machine gun fire.
"During the initial advance he was shot through the right leg, but though crippled he continued to lead his men and captured the trench.
"In the captured trench Lt. Mackintosh collected men of another company who had lost their leader, and drove back a counterattack.
"He was again wounded, and although unable to stand, he continued, nevertheless, to control the situation.
"With only fifteen men left, he ordered his party to be ready to advance to the final objective, and with great difficulty got out of the trench and encouraged his men to advance.
"He was again wounded and fell.
"The gallantry and devotion to duty of this officer were beyond all praise."
Lt Mackintosh was just 21 when he was killed.
British artillery had attacked German lines with heavy shells in preparation for the advance at Arras.
But many German machine-gun positions remained intact.
British units, including The Seaforths, suffered massive losses as they attacked.
In many cases, more junior officers like Mackintosh were expected to rally soldiers whose company commanders had already fallen.
By the time the Battle of Arras ended, the Allies had suffered 159,000 casualties, 46,000 of them Scots.

Mohammed Sidique Khan, Shehzad Tanweer and Hasib Hussain, along with a fourth man Germaine Lindsay, detonated bombs in London killing 52 people in 2005.
Qari Asim, of the Leeds Makkah Mosque, said their families were still in "this sense of shock and disbelief".
He said an event retracing their steps would take place over the weekend.
Mr Asim, whose mosque is in the Hyde Park area of Leeds, said: "Ten years on and the Muslim community, and the wider community, we are all still looking for answers, we are all still trying to find out what are the factors and what is the evidence that leads to radicalisation.
"The families of those three men who came from Leeds and blew themselves up in London, they are still looking for answers because to them they would never have imagined that their young men would do something like that and they're still going through this sense of shock and disbelief."
He said the three were described as "ordinary young men, they were gentlemen, they were good to talk to, they were very friendly people effectively", he said.
"How can three young men, living their ordinary lives, become so radicalised? Can be so motivated that they can take their own lives but also take the lives of others?"
This weekend a group of young people from different faiths are to travel from Leeds to London retracing the steps of the three bombers.
The Leeds Peace Ambassadors will undertake a "peace journey" to mark the 10th anniversary of the bombings, hoping to inspire unity among different faiths.
Fifty-two people died and hundreds were injured when bombs exploded on three Tubes and a bus.
Thirteen victims were killed on the bus at Tavistock Square, 26 died in a bombing at Russell Square on the Piccadilly line; six died in an explosion at Edgware Road on the Circle Line; and seven died at Aldgate on the Circle Line.
A memorial stone has been laid in Glasgow to honour a World War One officer who led a successful advance while so badly wounded he could not stand.
[NEXT_CONCEPT]
The families of three 7 July suicide bombers are still looking for answers 10 years on, an imam from their home city of Leeds has said.