The 23-year-old has signed a five-year contract with the east London side, who beat off competition from Premier League rivals Crystal Palace to secure his signature.
West Ham will pay an initial £9 million for Downes but the fee could rise to as high as £14 million if several clauses are met.
Downes told the West Ham website upon completing his move: “It’s a surreal feeling to have joined my boyhood club. I feel like I’m dreaming.
“It’s been my dream since I was a little boy to join this club – it’s an absolute privilege. This is my club, so I couldn’t be more delighted.
want to be the best I can be and this feels like the perfect opportunity to test myself against the very best players in the Premier League.
Players have come to West Ham from the Championship and progressed to international honours. That’s something you can’t ignore. The manager’s track record of bringing players through was a big motivation in me joining the club.
West Ham had to beat off competition from Crystal Palace to seal Downes’ signature ahead of the new season.
Palace were the favourites to sign Downes last week, but Swansea had been holding out for a bigger fee which opened the door for West Ham to join the race.
Downes joined Swansea from Ipswich Town last summer and thrived under Russell Martin.
We brought Jarrod Bowen from a similar situation at Hull, so we're always trying to find boys from the Championship who we think are going to step up to become Premier League players. I'm hoping that Flynn does. I think there's a good chance as he's got an awful lot of good attributes.
He becomes West Ham’s third senior signing of the summer after Nayef Aguerd from Rennes and Paris Saint-Germain’s Alphonse Areola.
Swansea are closing in on a deal for Joe Allen, who started his career at the Welsh club and is viewed as a replacement for Downes. Allen is available on a free transfer after leaving Stoke City at the end of last season.