Serpa, who has previously won the stage in 2006, 2007 and 2009, overcame a two-way battle for the lead over the final five kilometres of the steep 1679m climb to pip countryman Victor Nino Corredor.
The Colombian only moved to the front with around 400m left to race, with Jose Rujano Guillen third by some distance.
Overnight general classification leader Drapac's Darren Lapthorne lost enough time to be stripped of his yellow jersey with Serpa now seemingly assured to become the first two-time winner of the Malaysian race.
1 Jose Rodolfo Serpa Perez (Col) Androni Giocattoli 3:09:37
2 Victor Nino Corredor (Col) Azad University +0:00:02
3 José Rujano Guillen (Ven) Androni Giocattoli +0:00:46
4 Alexsandr Dyachenko (Kaz) Astana Pro Team +0:02:32
5 Jackson Rodriguez (Ven) Androni Giocattoli +0:02:53
6 Stefano Locatelli (Ita) Colnago - CSF Inox +0.02:53
7 Matteo Rabottini (Ita) Farnese Vini +0:03:25
8 Chris Butler (USA) Champion System +0:03:26
9 Andrey Zeits (Kaz) Astana Pro Team +0:03:28
10 Dennis Van Niekerk (RSA) MTN Qhubeka +0:03:35