The movie you're thinking of is likely Warm Bodies, a 2013 romantic comedy-horror film.
This movie tells the story of a zombie named R (played by Nicholas Hoult) who falls for a human girl named Julie (played by Teresa Palmer).
Warm Bodies explores the themes of love, loss, and the possibility of redemption even in the face of seemingly insurmountable obstacles.