The no-grip drag strip area of the track caught a number of drivers out as they rounded the final two corners, with several ending up in the wall.
Leclerc retired from the race on lap 27 when he hit the wall, but as he walked away from the incident, Hamilton also went wide and hit the barrier.
Hamilton's car went off further up the run-off area to where Leclerc had his trouble, with Leclerc walking in the opposite direction.
However, the Monegasque driver admits that he had no idea that Hamilton had left the circuit so close to him.
"I saw a video from the grandstand which surprised me," he said. "I had absolutely no idea that Lewis had gone off while I was walking in the gravel.
"I think he was aware on the radio that I was off at the last two corners, but it had been raining on the lap in these corners. So on slicks it was very, very tricky. There was not much anyone could have done."
Leclerc's DNF at Hockenheim marked his second of the year, coupled with his home race of Monaco.
The Ferrari driver insists that it was easy to get over his crash last weekend, as he sets himself up to end the opening half of the season on a strong note.
"I'm always analysing my mistakes after the race, which I did straight away. I tried to analyse what I've done wrong.
"There are a few things that we could have done better, but in the end, it was difficult to know it had rained. It was my first lap on the dry tyres. I moved on quite easily."
05:00 - 06:00
05:00 - 06:00