Can we use "him" for an animal for the passive form? Please check my below sentence and kindly let me know if I used "him" at the end of the sentence.
"When deer saw the lion running at him, he started to run faster and vanish in the jungle".
If the sex of the animal is undetermined you should use the neutral pronoun, so you would use "it" in your example. You can use he or she for pets, but you should make the sex of the animal clear. Always use he or she if the animal has been given a name.
Having said that, your example presents a slight problem if we use "it" in both clauses:
When the deer saw the lion running at it, it started to run faster and vanished in the jungle.
It is not immediately clear what the second "it" refers to: the deer or the lion. We could resolve this by putting:
The deer started to run faster when it saw the lion running at it, and vanished into the jungle.
Note that, in your example, deer needs a definite article and the tenses of start and vanish should match.