The McLaren driver had started the day 14 points clear of fellow Briton and teammate Jenson Button and 21 ahead of Red Bull drivers Mark Webber and Sebastian Vettel with seven races remaining.
Australian Webber was leading Vettel, who started on pole, in a Red Bull one-two after 26 of the 70 laps. World champion Button was back in ninth place.
Hamilton pulled over on lap 24, saying there was something wrong with the car.
Vettel takes pole for home German GP
Webber wins British Grand Prix for Red Bull
McLaren drivers divided by wet conditions
Hamilton hitches lift with buddy Button
Spotted: Lewis Hamilton in Bahrain