Hamilton hit the barrier at turn 10 of the Baku Street Circuit in the final phase of qualifying and is set to start only 10th, while his championship rival Nico Rosberg secured pole position.
In Hamilton’s absence, Sergio Perez qualified second, but will serve a five-place grid penalty following a gearbox change, with Red Bull’s Daniel Ricciardo third on the grid.
Hamilton, winner of the last two races in Monaco and Canada, appeared on course to claim the 54th pole of his career after dominating practice here.
But an uncharacteristically scrappy afternoon for the Briton, in which he made a number of errors, and only scraped through to Q2, ended with him in the wall with significant damage to the front right of his Mercedes.
“I’m out of the session”, said a dejected Hamilton over the team radio in what he is likely to regard as one of the worst qualifying sessions in his 10-season career.
On his return to the paddock, Hamilton added: “I had a fantastic rhythm yesterday but zero today. Sometimes it happens.”
Regarding his chances in Sunday’s race, he added: “I can’t really say yet what possibilities there are, but obviously I have to try and get up as high as possible. It is damage limitation from here and I will do what I can.”
Rosberg will have little sympathy for his Mercedes team-mate having seen the gap between the pair cut from 43 to just nine points over the last two grands prix.
Indeed Rosberg, with Mercedes so dominant on a street circuit which is being billed as the fastest on the Formula One calender, could afford to sit out the final minutes of qualifying once the session resumed following Hamilton’s crash.
“It was one of the more challenging sessions out there and everything worked out well,” said Rosberg. “I am very, very happy.”
Perez, who will drop to seventh after he was forced to change his gearbox following a crash in final practice, was seven tenths of a second adrift of the pole-sitter. The Mexican was the only driver within a second of Rosberg with Ricciardo half-a-second further back.