"It's true and they are beyond thrilled," a rep for the Penny Dreadful star told the website.
Hartnett, 36, has been dating Egerton, a 26-year-old British actress and model, for four years after meeting on the set of The Lovers in 2011. He had previously dated his Black Dahlia co-star Scarlett Johansson.
Though dating co-stars seems to have worked out quite well for Hartnett, the actor does acknowledge it has its fallbacks.
"Everybody makes mistakes dating people they work with," Hartnett told Playboyin April. "They're whom I'm attracted to because I share experiences with them and understand a bit about what they are and what they do. If I were able to go back in time, I don't know if I could have done anything any different."
TODAY'S VIDEO: How to make the perfect sliders for your July Fourth BBQ