The president praised it as "a very special moment."
It's the first time a new military flag has been created in more than seven decades.
"Space is going to be the future, both in terms of defense and offense and so many other things," Trump said. "And already, from what I'm hearing and based on reports, we're now the leader in space.
"This is really to unfurl the flag, but we've been doing this now for quite awhile."
Trump signed the defense spending bill that created the Space Force in December.
The flag features the previously released logo, which features a blue globe, a delta wing and three stars to represent the branch's mission of organizing, training and equipping. The flag unfurled during Friday's ceremony will remain in the Oval Office with the flags representing the other five branches of the military.