It is a sin for a human to kill other humans, animals, etc. But what about celestial beings?
Is it a sin for a human to kill innocent Rakshasas, Asuras, Pisachas, and Nagas? Like can humans commit genocide on them without sinning?
Is it a sin for a human to kill Rakshasas, Asuras, Pisachas, or Nagas?
Yes, it is sinful.
From the Mahabharata on Rishi Parashara's genocide of the Rakshasas:
“There is no obstruction, I hope, to this sacrifice of thine, O child! Takest thou any pleasure, O child, in this slaughter of even all those innocent Rakshasas that know nothing of thy father's death. It behoveth thee not to destroy any creatures thus. This, O child, is not the occupation of a Brahmana devoted to asceticism. Peace is the highest virtue. Therefore, O Parasara, establish thou peace. How hast thou, O Parasara, being so superior, engaged thyself in such a sinful practice? It behoveth not thee to transgress against Saktri himself who was well-acquainted with all rules of morality. It behoveth not thee to extirpate any creatures. O descendant of Vasishtha's race, that which befell thy father was brought about by his own curse. It was for his own fault that Saktri was taken hence unto heaven. O Muni, no Rakshasa was capable of devouring Saktri; he himself provided for his own death. And, O Parasara, Viswamitra was only a blind instrument in that matter. Both Saktri and Kalmashapada, having ascended to heaven are enjoying great happiness. And, the other sons also of the great Rishi Vasishtha who were younger than Saktri, are even now enjoying themselves with the celestials. And, O child, O offspring of Vasishtha's son, thou hast also been, in this sacrifice, only an instrument in the destruction of these innocent Rakshasas. O, blest be thou! Abandon this sacrifice of thine. Let it come to an end.“