I would take it to mean that with only a few moments/minutes remaining in the game, his team (or he) was losing. However, right at the last moment, he did something which ensured his team (or he) won (he scored a goal, for example). Until he did it, the game was "almost lost" but in the end, it was won.
I would hyphenate "almost-lost" in the first sentence.
You're right that the second sentence doesn't mean the same as the first.
Student or Learner