The 20-year-old marksman, a lance corporal in the Coldstream Guards, hit the trigger switch of the device from 930 yards away, causing the bomb to explode.
The blast killed the would-be bomber and five men around him. The incident in December in Kakaran, southern Afghanistan, was disclosed as Britain prepares to leave from the country by the end of the year.
Lt Col Richard Slack, commanding officer of 9/12 Royal Lancers, said the unnamed shooter also prevented another major attack as a second suicide vest packed with explosives was found nearby: "The guy was wearing a vest. He was identified by the sniper moving down a tree line and coming up over a ditch."