The German's Finnish team mate Kimi Raikkonen sealed the Ferrari front-row lockout.
Hamilton, one point behind the German in the standings and a five-times winner in Hungary, will start from a disappointing fourth place on the grid and alongside his Finnish team mate Valtteri Bottas.
Hungarian Grand Prix
Vettel wins in Hungary amid team orders controversy
30/07/2017 AT 13:48
Hamilton had been hoping to match Michael Schumacher's all-time pole record and had set the fastest lap of the second phase of qualifying.
Hungarian Grand Prix
Di Resta replaces Massa for Hungarian GP
29/07/2017 AT 11:02
Hungarian Grand Prix
Ricciardo fastest in second Hungary practice
28/07/2017 AT 14:10