He will start 10th, with Mercedes team-mate Nico Rosberg on pole, after crashing out following a series of mistakes through the hour-long session.
The Briton, 31, told BBC Sport: "Not a good day for me. Probably the worst session I've ever had in qualifying."
Hamilton, who is defending the drivers' title, said he would "have to think about" what had gone wrong.
Sunday's race is live on the BBC Sport website and radio 5 live from 14:00 BST.
"These kind of things do happen," he added. "I did not feel comfortable in the car. Ultimately, it was only me, nothing to do with the team or car. I just wasn't feeling good.
"I was 0.4secs up on both laps so there is no question of whether I was quick enough. I just didn't finish the laps. The car was very good yesterday. We made some changes and it wasn't as good today. I wasn't able to brake in the same places and I made too many mistakes."
Hamilton faces a race of damage limitation to his title hopes, as Rosberg, who is nine points ahead in the championship, is likely to run away in the lead, such is the level of Mercedes' dominance around the demanding new 3.7-mile street track in the Azerbaijani capital, Baku.
"P10 is going to be horrible as it always is around street circuits," Hamilton said.
"I don't know what I can do from there but I need to try to get as many points as I can.
"Finishing the race is important and not allowing Nico to pull too far away. Hopefully I can stay out of trouble.
"If I don't get caught up in other people's mistakes, good points are still possible. It's not impossible I could win."
Hamilton has a potential problem for the race because it is unclear whether he has a set of tyres in good enough condition to start.
Media playback is not supported on this device
The rules say a driver must start the race on the set of tyres on which he set his fastest time in Q2, but Hamilton's were damaged because he locked them up.
If there is a safety issue they can be changed at the FIA's discretion, which would almost certainly be granted.
Hamilton said: "All my tyres are flat-spotted so I have no idea what they are going to do."
However, he said he was optimistic he could still have a good race.
"If I don't get caught up in other people's mistakes, good points are still possible. It's not impossible I could win."
Hamilton's string of mistakes at one point affected Rosberg, as the German had to abandon his first flying lap in the final session because the other Mercedes had gone off in front of him.
Rosberg said: "One of the more challenging sessions out there but everything worked out well.
"There was a bit of reorganising because in Q3 Lewis had an off in front of me and I had to abort that lap and do one more at the end. But it worked out great.
"I have been building towards it and qualifying felt really optimum."
Rosberg anticipates an action-packed race on the new Baku street track.
He said: "They have done a great job up to now with the track.
"We have seen one of the most exciting sessions for a long time and that is down to the track and I am sure the race is going to be very exciting.
"It is one of the easiest places to overtake so a lot of places changing and probably some safety cars."
Subscribe to the BBC Sport newsletter to get our pick of news, features and video sent to your inbox.
Lewis Hamilton said his error-strewn qualifying session at the Grand Prix of Europe was the worst of his career.