In 1904 he was army champion for 880 yards, and in 1905 he won the Scottish and AAA 440 yard (402 m) titles. In the Athens Intercalated Olympics, he achieved a silver medal in the 400 metres and a bronze in the 800 metres. On his return, in a single afternoon in 1906 at the Scottish championships in Powderhall, he won the 100, 220, 440 and 880 yards races (91, 201, 402, 805 m), a feat that has not been matched since.[3] His season was cut short by a leg injury in 1907, but he came back the following year to set a world record of 31.2 s for 300 yards (274 m) and a British record over 440 yards of 48.4 s[3] that lasted over a quarter of a century until it was eventually broken by Godfrey Rampling. In 1908 he set a Scottish 300 yards record that lasted until 1961 when it was beaten by Menzies Campbell, then a Glasgow University student.[2]

In 1908 Summer Olympics, Halswelle reached the final of the 400 m with the fastest qualifying time (an Olympic record 48.4 s). The 400 m was not run in lanes at this point. Halswelle was baulked by William Robbins in the first 50 m.[3] Then, coming off the final bend, Robbins led John Carpenter by a yard, with Halswelle waiting to pass him in the last straight, as he had done to other athletes in the earlier rounds. Carpenter ran wide, forcing Halswelle to within eighteen inches of the outside of the track, using his right elbow to prevent Halswelle overtaking.[3] On seeing the interference, umpire Roscoe Badger shouted "Foul!", the tape was broken, and the race declared void.[3] Pictures of the race indicate that Carpenter (intentionally or not) blocked Halswelle.[4] While blocking was allowed under U.S. rules at the time, the Olympic race was conducted under stricter, British rules that did not allow this.[3]

The race was ordered to be rerun in lanes two days later without Carpenter; however, the other two U.S. runners refused to race, so, though reluctant, Halswelle ran the race by himself to win the gold in a time of 50.2 s.[3] It is the only occasion in Olympic history where the final was a walkover. As a result of the controversy, from the next Olympics in 1912 onwards all 400 metre races were run in lanes, and the International Amateur Athletic Federation was founded to establish uniform worldwide rules for athletics.

The controversy soured Halswelle's view of athletics. He was also under pressure from his senior officers, who felt he was being exploited,[5] and he retired from athletics after a farewell appearance at the 1908 Glasgow Rangers Sports.[3]

Halswelle, by then a captain, was killed by a sniper at the Battle of Neuve Chapelle in France, during World War I,[3] on 31 March 1915 while attempting to rescue an injured brother officer. Earlier in the same battle (12 March) he was hit by shrapnel or shell fragments while leading his men across an area known as Layes Brook but despite his wounds he refused to be evacuated and continued at the front, although heavily bandaged.[6]

In the issue of the HLI regimental magazine that announced his death also appeared a piece he wrote days before it. It described a battle where 79 of his fellow soldiers died to gain 15 yards:

"I called on the men to get over the parapet... There is great difficulty in getting out of a trench, especially for small men laden with a pack, rifle and perhaps 50 rounds in the pouch, and a bandolier of 50 rounds hung around them, and perhaps four feet of slippery clay perpendicular wall with sandbags on the top. I got about three men hit actually on top of the parapet. I made a dash at the parapet and fell back. The Jocks then heaved me up and I jumped into a ditch – an old trench filled with liquid mud – which took me some time to get out of."[2]