Wallace, a Commonwealth Games hero for Scotland last summer, has previously had his best performances in the 400m, but found himself in contention for medals in the shorter event in Russia.
He was in third place with 50m to go after the turn but was pipped by China’s Wang Shun by 0.78 seconds to miss out on a podium place.
Ryan Lochte of the United States won gold in 1min 55.81sec for a record fourth consecutive title in the 200m individual medley. Thiago Pereira of Brazil finished second in 1:56.65, and Wang was third in 1:56.81.
“My initial reaction when I saw a four next to my name was heartbreak but looking back on the race, I think I did a great job,” Wallace said.
“I was seeded 10th coming into this meet so to finish fourth is obviously a great achievement.”
The 22-year-old’s chances of a medal are not over completely though, with him going again in his favoured 400m on Sunday.
Wallace, who won gold in the event at Glasgow 2014, added: “It’s always hard when you finish that close to the medals but fortunately I have the relay tomorrow and the 400m IM on Sunday.
“There’s loads of good things I can take away from that swim which will help me later in the week. The longer event suits me better overall and hopefully I can bring the same form that I’ve had tonight.”
There was similar frustration for the British women’s 4x200m relay team after they touched home in fifth place in the final, missing out by 1.5secs.
The race was won by the US, with Katie Ledecky anchoring the Americans to a 3.04-second comeback victory for her fourth gold of this meeting. Missy Franklin led off the relay for the Americans, and Leah Smith and Katie McLaughlin kept them within striking distance of pacesetters Sweden. Ledecky quickly pulled even with Swedish anchor Ida Marko-Varga before powering to victory in 7 min, 45.37sec.
Italy earned silver in 7:48.41. China took bronze in 7:49.10. The Swedes faded to fourth.
Commonwealth silver medallist Lauren Quigley was the only other British finalist yesterday, with the 20-year-old finishing seventh in the 50m backstroke. But Andrew Willis is through to today’s 200m breaststroke final.