Malkin scored in the dying minutes to take his personal tally to 19 points (11 goals, 8 assists) as the Russians, unbeaten in the tournament, claimed their fourth world crown.
Underdogs Slovakia, with just a single world championship from 2002 to their name, shocked the Russians as Zdeno Chara slammed home a slapshot to give them the lead after only one minute.
But Russia were not about to be denied and they combined mesmerising speed and teak-tough tackling to take control.
Syomin put the Russians back on level terms midway through the first period and they followed up with a breathtaking three-goal burst in the second.
Alexander Perezhogin put them ahead, backhanding to an empty net as the Slovak defence struggled to keep up.
Alexi Tereshenko then made a lightning exchange of passes with Sergei Shirokov before firing home to make it 3-1.
Syomin stepped back into the limelight to score his second as the Slovaks gave up possession cheaply in their own zone.
A quick pass inside allowed the Washington Capitals wing to go one-on-one with Jan Laco in the Slovakian goal before finding the net.
Pavel Datsyuk increased the Russian lead before Boston Bruins defender Chara scored his and Slovakia's second on a power-play.
All that was left was for Malkin to get his name on the score-sheet, which he duly did with two minutes to go.
The Pittsburgh Penguins centre picked up the puck around his own blue line before weaving forward and hammering home his final shot of the tournament.
In the bronze medal match, Finland flopped once again in front of their home fans, losing 3-2 to the Czech Republic.
The Czechs fired three goals in the first period to leave the Finns on the ropes and lead 3-1 at the first break.
With the match slipping away, the Finns came to life in the third, exerting massive pressure and out-shooting the Czechs by a margin of 14-1.
Jussi Jokinen pulled one back midway through the period but the Finns could not find another goal to force overtime.