McLaren have been found guilty of a fuel irregularity under the current FIA technical regulations as Hamilton stopped on track after seemingly claiming the team's 150th pole in Formula One.
McLaren had cited force majeure and had hoped to remain on pole, but following a lengthy stewards' hearing the 27-year-old and the team have been handed a severe penalty.
An FIA statement read: "The stewards received a report from the race director (Charlie Whiting) which stated that during post-qualifying scrutineering a sample of fuel was required from car 4 (Hamilton).
"However, the car failed to return to the pits under its own power as required under article 6.6.2 of the FIA Formula One technical regulations.
"The stewards heard from the team representative, Mr Sam Michael, who stated that the car stopped on the circuit for reasons of force majeure.
"A team member had put an insufficient quantity of fuel into the car, thereby resulting in the car having to be stopped on the circuit in order to be able to provide the required amount for sampling purposes.
"As the amount of fuel put into the car is under the complete control of the competitor, the stewards cannot accept this as a case of force majeure.
"The stewards determine that this is a breach of article 6.2 of the FIA Formula One Technical Regulations and the competitor is accordingly excluded from the results of the qualifying session.
"The competitor is, however, allowed to start the race from the back of the grid."
A McLaren spokesman said: "We accept the stewards did not agree with our interpretation of force majeure.
"Our aim is now to maximise the points we can score tomorrow [Sunday]."
McLaren team boss Martin Whitmarsh had earlier cited a technical issue was the root cause of the problem, although did not rule out human error.
Hamilton had just cruised to top spot on the grid, seemingly for the 22nd time in his F1 career, and third time this season.
The 27-year-old had deposed the unlikely figure of Williams' Pastor Maldonado from pole by 0.6secs with a blistering lap around Barcelona's Circuit de Catalunya.
However, via the team radio, Hamilton was told to stop on track at around the halfway point on his slowing-down lap.
FIA rules state a car must return to the pits after qualifying, and then have a litre of fuel remaining for a sample to be taken.
Whitmarsh claimed 1.3 litres was ultimately extracted, but clearly the additional 0.3 litres - over and above the required one litre - would not have been enough to see Hamilton return to parc ferme.
Asked if there was no force majeure whether Hamilton could have driven back to parc ferme and then had enough fuel for a sample, Whitmarsh replied "yes" on both occasions.
The stewards have clearly deemed otherwise, citing the failure of a team member to adequately fill the car.
It is the latest in a catalogue of errors from McLaren this year, notably involving Hamilton.
In the season-opening Australian Grand Prix in which he started from pole, he was not released at the right time at a pit stop, eventually finishing third.
A week later in Malaysia, and again after claiming pole, there were issues at pit stops involving his rear-left and front-right tyres, and again was third.
In China, after qualifying second, Hamilton received a five-place grid penalty as his car required a new gearbox, and for the third consecutive race he wound up third.
Then in Bahrain three weeks ago, there were issues with his left-rear tyre at two separate pit stops, resulting in him finishing eighth and losing his lead of the drivers' championship.
Hamilton now faces a tricky task just to get into the points on Sunday.
Asked prior to the penalty as to his thoughts should he receive one - although at the time appreciating it was not going to be so harsh - Hamilton said: "Looking at our long runs they're not too bad.
"The option (soft) tyre was not too spectacular with the set-up I had yesterday [Friday], but we've made some changes so it should be better.
"The long run on the prime (hard) was very good, but then again it was the same for the other guys.
"Overtaking here is very tough, as we've seen in previous years, but we have the DRS so I would hope we can overtake...I highly doubt it.
"But I will obviously do everything I can to move up and forwards.
"Definitely the guys at the front have a much easier job because they have clearer air.
"Of course I'll give it my all, and we'll give it our all, and I hope with our improved pit stops as well we can make steps forward."
As for Williams, on the day the team celebrated Sir Frank's 70th birthday that officially was nearly four weeks ago, the present from the stewards was a welcome one.
For Maldonado, it is his first F1 pole, his highest grid slot by six places, and the team's first pole since Brazil 2010.
A naturally delighted Maldonado said: "It's a great moment for the team, for me, and it's the best present ever for Frank Williams.
"I hope to have a great race tomorrow [Sunday]. I'll do my best - we'll see.
"We have everything and I think the team must be ready for all the situations in the race.
"But the motivation is there, the mechanics are ready, we're all ready."