Nyquist had won an emphatic victory in the first race in the series, the 142nd Kentucky Derby.
But Exaggerator, ridden by Kent Desormeaux, produced a masterful display on a sodden course to overhaul the favourite on the home straight.The third Triple Crown race, the Belmont Stakes, is on 11 June.
"I had a dream trip today,'' jockey Desormeaux said. "It was an amazing race and Exaggerator is an amazing horse.''
It was Nyquist's first taste of defeat after eight wins in a row.
The colt led the race from the start at Pimlico Race Course but faltered near the line and eventually finished third behind Cherry Wine.Nyquist's trainer Doug O'Neill would not confirm if Nyquist would run in the Belmont Stakes next month.
"I didn't think we could get beat to be honest with you. Nyquist is such an amazing horse. He still ran a great race," he said.
Mr O'Neill and Nyquist's rider Mario Gutierrez were having their second shot at a Triple Crown having missed out in May 2012
I'll Have Another won the first two races but was scratched from the final leg at Belmont due to a tendon injury.
American Pharoah became the first horse to win the US Triple Crown for 37 years in June 2015.
Twelve horses have secured the prestigious treble, since it was first achieved in 1919 by Sir Barton.