The two teams were the last to play their opening game in the Olympic tournament and the Czechs moved into a tie with Russia at the top of Group B.
Marian Gaborik of the New York Rangers tied it for Slovakia in the first minute of the second period and it stayed that way until Jagr, one day after his 38th birthday, put in what turned out to be the game-winning shot.
Jagr has played the last two years for a team in Russia after an NHL career that saw him lead the league in scoring five times.
"I have not played a game like this in a while. It is different hockey," Jagr said.
Slovakia outshot the Czechs 35-24, but were denied by goaltender Tomas Vokoun of the Florida Panthers.
After Jagr's goal, Tomas Plekanec of the Montreal Canadiens scored with just two seconds left in the second period.
Gaborik played for Slovakia despite reports prior to the Olympics that he would sit out the tournament with a leg laceration.
Slovakia returns on Thursday to meet Russia and the Czechs will take on Latvia on Friday.
Each team plays three games before the quarterfinalists are determined.
Martin Bashir resigns from MSNBC over Sarah Palin comments
Exploding whale video goes viral on Internet