In the do or die match between Germany and South Korea in 2018 FIFA World Cup group stage, after conceding one goal, the German goalkeeper came forward to attack, leaving the goal post empty. Due to this, Korea scored an easy goal. Why did Neuer do this? Has he done anything like this in the past successfully?
When Neuer left the German's penalty area, Germany were already losing 1-0 and going out of the World Cup. By effectively becoming an extra outfield player, he increased the chance of Germany scoring the goal they needed to draw the match and stay in the World Cup. It didn't work, but that doesn't mean it wasn't the right thing to try.
A famous similar situation in which this tactic did work was at the end of the 1998-1999 Football League season: Carlisle United needed to win their last match to avoid being relegated from the Football League, but were drawing 1-1 in injury team. Their goalkeeper, Jimmy Glass, made his way into the opposition penalty area and scored the goal which kept Carlisle in the league.
Crossing sports slightly, "pulling the goaltender" is a common tactic when a team is losing by one or even two goals late in an ice hockey match. The maths works out slightly differently there as "goal difference" is of just about zero importance in ice hockey but can be significant in football, which is why goalkeepers generally won't go running around out of their area in most football matches.
It is a common tactic when you're behind and need the goal. Especially when another goal against you wouldn't matter anyway you try to get an extra on-field player by doing this. But unlike in other sports you don't do this all the time when you're in possession of the ball. Usually you try to get a good standard (corner kick or free kick in the red zone for example) and then use the goalie in the box.
In other sports (e.g. Ice Hockey, Handball) you can sub out the goalie while you're in possession and play the whole attack with an extra "real" on-field player. This also happens a lot more than a football goalie coming out of the goal.
I should preface this by a disclaimer that I am by not means expert, just a regular fan who occasionally watches a game.
You can often see Manuel Neuer playing outside of penalty box, basically in the position where you typically see one of defenders - even in normal situations, not only near the end of a match. See also Style of play section of the Wikipedia article about him (current revision). This is however a different situation.
It is by no means unusual in a final minutes of a game when a team needs to score that goalkeeper plays in field. Definitely if a team has a corner kick or free kick and players who are good in the air can help, then often a goalkeeper goes forward. Still, in the situation in the match, maybe it would be more logical if Neuer stayed on Germany's half but moved into field. This would allow some player from the defense line to move forward and depending on situation Neuer could either sprint back to the goal or cover Korean counter-attacks in the field. In fact, there was a bit of criticism in the media. (For example, World Cup 2018: Manuel Neuer’s Thrilling, Tragic Run Upfield or Celtic Legend Chris Sutton Tears Into Manuel Neuer As Germany Are Eliminated From The World Cup.)
As to your question whether in the past he succeeded in something like this - I tend to believe that the statistics in the Wikipedia article are accurate and he has not scored a goal yet. (But he scored several times in penalty shoot-outs.) For some other goalkeepers, you can find some information in this Wikipedia list: List of goalscoring goalkeepers.
We can not know what Neuer's thoughts were. However as you state in the question it was a do or die match. Germany was 1-0 down and that result would mean they were out of the World Cup. So defending that result would not help them. Scoring a goal would have helped them so sending an extra attacker in the person of Neuer is a good tactic. Yes, you run a risk of getting an extra goal against you but not scoring yourself is worse than getting another goal against (although it further limits your chances). It's a tactic that has been used many times in matches where you really need that goal.
As to your second part of the question. I don't know if Neuer has done this before but there are cases where the goalkeeper came up and scored that very important goal. No examples that I can reference here (I don't have time to hunt for them at the moment)