Heisey's solo drive with one out in the ninth off Jared Hughes (6-5) helped the Reds avoid getting swept at PNC Park. Heisey began the day with just five homers in 229 at-bats this year.
Cueto (16-8) gave up a home run to Josh Harrison on his first pitch of the game. Jordy Mercer homered off Cueto in the second for a 2-0 lead.
Cueto wound up pitching eight innings and tied Dodgers ace Clayton Kershaw for the major league lead in victories.
Aroldis Chapman struck two in a perfect ninth for his 29th save.