France's Yannick Agnel led from start to finish and took the gold with a time of 1:43.14. He was followed by South Korea's Park Taehwan and China's Sun Yang, who shared silver with a 1:44.93 time.
Yang, who already won gold in the 400M freestyle, had earned the top spot in the semis with a fast 1:45.61.
Lochte had cruised to a fifth place finish in the 200 meter freestyle semifinals Sunday, with a time of 1:46.31.
Lochte started the 2012 Games with a dominating performance in the 400 meter Individual Medley, besting rival Michael Phelps, the world record holder in the event. But on Sunday, pulling past Lochte in the final lap, France took the gold in the men's 4x100 meter freestyle relay.
The win upset favored Australia and the United States, who took home silver.
The Americans led all the way until Agnel pulled ahead of former University of Florida Gator Lochte in the final lap.
France clocked 3 minutes, 9.93 seconds, and the Americans settled for silver in 3:10.38. Russia took bronze in 3:11.41.
"I was just really excited and I think I overswam the first 50 and it hurt me for the last 50," Lochte said. "But we were able to get a medal, so I guess that's good."