Deflected spells often bounce back at the one who cast them.
Lily willingly sacrificing herself created a sort of shield that protected Harry from the Dark Lord harming him, so the Killing Curse wouldn’t hit him. Her sacrifice only had the effect of protecting Harry, not nearly killing the Dark Lord. However, deflected curses don’t just disappear as soon as they’re deflected, and can turn back on the person who cast them. For example, when Harry tried to cast a Stunning Spell at Bellatrix, she casts Protego and sent his own spell back at him.
“Stupefy!’ yelled Harry. He had edged right around to where the goblin stood beaming up at the now headless wizard and taken aim at her back as she peered around the fountain. She reacted so fast he barely had time to duck.
‘Protego!’
The jet of red light, his own Stunning Spell, bounced back at him.”
- Harry Potter and the Order of the Phoenix, Chapter 36 (The Only One He Ever Feared)
While Lily’s sacrifice is a much rarer type of magic, the shield it created seems to have worked the same way as a Shield Charm - it reflected the spell and sent it bouncing back in the direction it came, which was at the Dark Lord, who was standing right near Harry when he cast it.
“He pointed the wand very carefully into the boy’s face: he wanted to see it happen, the destruction of this one, inexplicable danger. The child began to cry: it had seen that he was not James. He did not like it crying, he had never been able to stomach the small ones’ whining in the orphanage –
‘Avada Kedavra!’
And then he broke: he was nothing, nothing but pain and terror, and he must hide himself, not here in the rubble of the ruined house, where the child was trapped and screaming, but far away … far away …”
- Harry Potter and the Deathly Hallows, Chapter 17 (Bathilda’s Secret)
When Lily’s sacrifice reflected the curse away from Harry, it would have been sent in the Dark Lord’s direction. The Dark Lord was standing very closely to Harry when he cast the Killing Curse, so he wouldn’t have had much time to notice it was being deflected and get out of the way.