The 21-year-old winger fired the visitors into a fourth-minute lead when his early strike proved too much for keeper Bram Castro.
Heracles got back on level terms through Thomas Bruns as the Eredivisie strugglers threatened a shock result to aid their quest to survive in the top flight.
However, Sam Larsson fired the Super Frisians back in front just before the hour mark.
Heerenveen then added a third with 16 minutes left when Slagveer took advantage of poor defending in the Heracles back line to beat Castro again.
Mark Uth made sure of the three points on 82 minutes after good work from Larsson in the build-up.
The result leaves Heerenveen in sixth place, while only goal difference keeps Heracles out of the relegation places.