Sunan an-Nasa'i, Book 37, Hadith 91 (Nasa'i 4066)

It was narrated that Jarir said:

"Any slave who runs away from his masters and joins the enemy, he has made it permissible to shed his blood."