When a friend doesn't stand by his friend in need, what expression do we use for it? I'm particularly looking for a phrasal verb. The sentence should be in positive form, as I've already written the negative form "not stand by someone". It should be like "run away/turn someone's face away/close the doors".
There are several ways to say support is no longer being given
turn their back on
turn away (from)
neglect (particularly used with children and pets)
stopped taking his calls (another way of saying ignore)
blanked (can also mean ignore)
usage may also depend on context, examples
The supporters of the President have turned their backs on the latest proposals
When the homeless man asked for money, people just turned away
When she needed him the most, he just disappeared
All his pleas for help were ignored
The starving cat was left at home and neglected for a week.
The agent who had been so helpful, recently stopped taking my calls
When I asked for help, he blanked as if he didn't know what I was talking about
You could also use desert, even though it's not a phrasal verb.
(Note that desert is a bit different from ignore. The word desert implies "leaving"; with ignore, one might stay but pretend that they do not see or notice the need. This word may not be the best choice on all occasions; I added this answer because I think desert could fit many instances of such an occasion you described in the question.)
[transitive] to leave someone in a situation where they have no help or support
a story in which a woman deserts her husband
Some examples around the web:
He took off on a joint mission with another RAF fighter pilot, but, when he saw a flock of enemy planes nearby, he deserted his friend.
--In the Zone: The Twilight World of Rod Serling by Peter Wolfe, page 143.
He left his friend in the water for more than eight hours while he went back to his room. He deserted his friend in time of need.
--'Deserted Friend'. The Milwaukee Sentinel - Aug 13, 1969.