Moments after the restart, Endo sent a looping but tame free-kick to goal but Sorensen fumbled it over his head and the ball smacked off the post.
Denmark had wasted countless chances, including the gilt one at the 72nd minute when Dennis Rommedahl found himself in space inside the area and slid the ball back into the path of Jon Dahl Tomasson, who fumbled his shot from seven meters.
Two minutes after Danish striker Soren Larsen rattled the crossbar, Tomasson finally scored for Denmark, following the penalty kick which was awarded for a push on Daniel Agger.
The spot kick was blocked but Tomasson hit the rebound into the corner.
Japan killed the game in the 87th minute as Honda set up Shinji Okazaki, who calmly tapped the ball into an empty net.
The Samurai Blue garnered six points to finish second in the group, which was won by the Netherlands on nine points. Denmark were sent packing with three points with winless Cameroon in bottom.
"For Japan it's a big win," Honda said after the game. "I'm glad we won but I am not satisfied. The next game (against Paraguay) is more important. I want to show the Japanese that nothing is impossible."
"Prior to the match, the coach said we shouldn't concentrate on the defense and that we should attack," added the Asian Player of 2009. "That's what the coach told the players to boost our motivation. It was really effective and led to this wonderful result."
The Dutch have kept a perfect record in South Africa World Cup thanks to Klaas-Jan Huntelaar's late winner.
Robin van Persie put the Dutch ahead following a one-two with Rafael van der Vaart.
Cameroon had evened the scores through a Samuel Eto'o penalty which was awarded after a handball by Van der Vaart, before Huntelaar tapped in a rebound off the post.