Marquez and Iannone locked out the top two positions for the majority of the German Grand Prix Friday morning session, with the Honda rider leading by three tenths initially.
But Marquez, who has won every year at the Sachsenring since he was in 125cc in 2010, did not improve on his 1m21.832s time.
Iannone first closed the gap to less than a tenth and then moved ahead of Marquez, beating him by 0.390s with a 1m21.442s.
Grand Prix Germany
Espargaro leaves hospital after Germany crash
20/07/2018 AT 19:44
Valentino Rossi was best of the rest thanks to a last-minute improvement, more than half a second off the pace. He demoted his Yamaha team-mate Maverick Vinales, who ended up fourth.
Andrea Dovizioso was the top Ducati rider in fifth, closely followed by Pramac duo Danilo Petrucci and Jack Miller - who beat second factory rider Jorge Lorenzo by 0.007s.
Aprilia's Scott Redding was further 0.031s behind in ninth with Johann Zarco completing the top 10.
Alex Rins was 12th behind Takaaki Nakagami, with Rins one of three riders to crash in the session.
The Suzuki rider fell in the twisty section at the start of the lap, while Alvaro Bautista crashed at the first corner while he was passing his Angel Nieto Ducati team-mate Karel Abraham. Avintia Ducati's Tito Rabat crashed at the fast right-hander that follows the track's long sequence of lefts.
After dominating the Thursday media day with his retirement announcement, Dani Pedrosa was only 14th.
That was five places better than Honda stablemate Cal Crutchlow, who was two positions behind top KTM rider Bradley Smith in 19th.
Franco Morbidelli, who returned after skipping Assen with a hand injury was 22nd, with KTM wildcard Mika Kallio taking 24th.
FP1 times
Grand Prix Germany
Marquez: Title priority over Germany record
14/07/2018 AT 16:43
Grand Prix Germany
Marquez on pole in Germany for ninth year in a row
14/07/2018 AT 14:05