No, K9 Advantix II does not prevent heartworms. It is primarily designed to repel and kill fleas, ticks, and mosquitoes.