Yes killing elephants in Africa is illegal and especially illegal in Kenya Africa.
Elephants are an endangered species of animals in Africa and Kenya Africa so they made it illegal in 1973 to Kill or hunt Elephants.
Not only was killing elephants made illegal in Africa the ivory trade was also banned and made illegal in Africa and Kenya in the year 1973.
If caught illegally hunting or killing elephants in Africa or Kenya you could face fines and possible jail time.
So it's not worth it to risk getting caught killing elephants in Africa.