The funny moment occurred during an episode of 'The Ellen DeGeneres Show.'
The soccer superstar sat down with Ellen DeGeneres and chatted about his latest projects, as well as his four children -- Brooklyn, 21, Romeo, 17, Cruz, 15, and Harper, 8 -- with wife, Victoria Beckham. At one point during their conversation, the daytime talk show host brought up David and his kids going over to Justin Bieber's house to trick-or-treat on Halloween. As the British star shared the story, the "Sorry" singer popped out of the side table and scared him.
"They said, 'Dad, can you just contact him? Come on, you are who you are. I'm sure he'll reply to you,'" David recalled. "So I DM'd him and he got back within, like, seconds. And he said, 'Yeah, we're doing it now.' So we were literally two minutes from the house. So we went straight there, turned up and we all got snow cones."
Ellen then asked David about his boys almost wanting to name their sister Justine before she was born, and that is when Justin popped out, much to David's surprise.
"Sorry," the singer said as David realized who it was and gave him a hug. "They wanted me to do that."
"I really didn't think that was going to happen," David later said with a laugh as Bieber exited the studio. "I know you all love him. He's the most amazing human being. He really is."
In fact, just last month, David, Harper and Cruz attended Justin's concert in London and got to go backstage, where Justin made Harper's day when she got a hug from the pop star.
During his interview with Ellen, David admitted that his 8-year-old daughter turns him to mush. "The boys, obviously, give me a little bit of stick because they know that any question that they ask they think I'm going to say no to," he explained. "They know they have to ask her to ask me because I can't say no to her. I think I only said no to her once, and her bottom lip started shivering and I was like, never again."
"She's amazing, she's a little princess with, obviously, Victoria. She's a mommy's girl. But also, she's a big daddy's girl, which I'm over the moon about."
ET spoke with David last month, where he opened up about becoming co-owner of a new Major League Soccer team, Inter Miami, and how his long-term goal is to leave a legacy for his four kids.
"I like to feel that I still impress my kids all the time," the 44-year-old former soccer pro explained. "We've always said that this is not a vanity project for us. This is a legacy. It is what we want to create for our children. We want our children to turn around in 10, 15, 20 years and say, 'Our dads built this.'"
See more in the video below.
Victoria and David Beckham’s Daughter Harper Gets a Hug From Justin Bieber During London Concert