The Serb admitted he "wasn't really 100%" going in to his match, which stretched out over two days because of rain delays.
Djokovic, who has already won the Australian and French Open this year said he was hurt by his exit, but added: "I managed to win four Grand Slams in a row over two different seasons. I want to focus on that rather than on failure."
It was his first defeat in a Grand Slam third round for seven years.
World number one Novak Djokovic has been knocked out in the third round at Wimbledon by American Sam Querrey.