The attacker's 65th minute effort at the Baba Yara Stadium in Kumasi has lifted the Phobians to 10th on the table, tied on points with the Porcupine Warriors.
The strike has also taken the Accra-based side's winning tally over their arch-rivals to 36 in 107 league matches since 1958. Kotoko stay on 33 victories, with 38 matches ending in stalemates.
Hearts, like in their preceding two matches, were without head coach Henry Wellington, who is away on sick leave.
Assistant coach Nii Odoom made five changes to his starting XI, with new acquisition Kojo Obeng Junior handed his debut.
Kotoko coach Samuel Paa Kwasi Fabin, likewise, handed Burkinabe import Sogne Yacouba a first-time appearance, with Daniel Darkwah returning to the outfit after an injury layoff.
The two sides struggled to hold on to possession in the opening minutes, and the lack of clear-cut opportunities was another characteristic of the first quarter of the meeting.
In the 15th minute, Patrick Razak was played through on goal but Amos Frimpong showed good strength to rob him of the ball.
Moments after Kotoko's Emmanuel Gyamfi miscued a shot off target, Joseph Esso drove an effort just wide at the other end, before Hearts saw a penalty shout in the 27th minute ignored when Esso went down under the challenge of Edwin Frimpong.
Kotoko made their own penalty call in the 35th minute, but referee Timothy Obuobisa could only award them a free-kick on the edge of the box.
Hearts goalkeeper Ben Mensah was called into action as it had to take his save to deny Yacouba the opener from the resulting free-kick.
Two minutes to half-time, Kotoko had another opportunity to break the deadlock but Wahab Adams failed to direct his header on goal after being set up by Jackson Owusu.
Back from recess, Obeng was left down by his final ball following a good run into Kotoko box, before goalkeeper Mensah parried another free-kick from Yacouba.
Razak then tried his luck for Hearts but his overhead kick was pushed away by goalkeeper Felix Annan.
There was then a huge scare for the Phobians in the 58th minute when Mensah misjudged a corner kick. Darkwah picked up the loose ball but saw his effort cleared just off the line.
Then came the moment of the game in the 65th minute when Razak broke the deadlock against the run of play.
The winger claimed a pass over 25 yards, made a run into the box, beat one man before releasing a shot into the roof of the net.
Razak was again put through on goal in the 70th minute but Amos Frimpong did well, this time, to handle the danger.
Moments later, Frimpong almost scored in his own net, but for the crucial intervention of goalkeeper Annan.
Hearts, by the result, have made it 19 league wins over Kotoko in 50 matches in Kumasi, two more than their nemesis, with 14 games ending in draws.