The 21-year-old agreed personal terms and passed his medical with the club last week before linking up with the Wales squad for their Euro 2020 qualifiers.
United will pay a £15m fee up front for the winger with a further £3m tied up in add-ons.
“This is one of the best days of my life and a challenge I am really looking forward to,” James said. ”The Premier League is the best league in the world and Manchester United is the perfect place for me to continue to develop as a player.
“This is an incredibly proud moment for me and my family, however, it is tinged with sadness that my father isn’t able to share this experience with us. I am looking forward to working with Ole [Gunnar Solskjaer], meeting the team and getting started.”
Solskjaer added: “Daniel is an exciting young winger with lots of skills, vision, exceptional pace and a good work ethic,” United manager Ole Gunnar Solskjaer said.
“He had a great season with Swansea City and has all the attributes needed to become a Manchester United player.”
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies