Avengers.
Yeah. Cap used the cosmic cube -- sort of this... crazy glowing magic box endowed with Real Ultimate Power that drove its previous possessors insane. He told Bucky to remember who he was, and it happened.
Then he sort of ran off and tried to kill me, but that's-- a very long story.