He produced his best lap of the session to move up to 16th but not quite fast enough to progress to Q2. He was only 0.029s away from putting the Toro Rosso-Honda into the next qualifying session and a 0.188s improvement would have earned him 13th.
It was hard to gauge exactly where he was in reference to teammate Pierre Gasly. The Frenchman was 20th fastest but made a hash of his final flying lap, locking his brakes and under-steering off the track momentarily.
Hartley was faster than both Saubers and the Williams of rookie Sergey Sirotkin.
"Definitely a little bit annoyed to be 16th and not one or two places ahead," the 28-year-old New Zealander said. "It was really tight.
"The car felt good on that last lap. A bit frustrating because I can't help but feel like there was a couple of tenths left on the table from my side. I guess everyone will have a similar story.
"That battle from 10th to the back is really tight – today we just missed out. A little bit annoying but there are a lot of positives from the first round.
"We can definitely fight in that midfield and, if not tomorrow, soon battle to be in the points.
"This morning was encouraging and so was the long run pace it is just a question of how we make up a few places on Sunday."
At least he won't have a grid penalty hanging over his head for the first time in his brief Formula 1 career.
Reigning world champion Lewis Hamilton posted a lap record in Q3 to secure pole position from Ferrari pair Kimi Raikkonen and Sebastian Vettel.
Max Verstappen starts fourth in the Red Bull.
Mercedes driver Valtteri Bottas lost control of his car early in Q3 and smashed into the wall, bringing out a red flag.