ESPN reported last week that West Ham had agreed a £30 million ($38.08m) deal with Southampton, on the same day they agreed a similar fee with Manchester United for defender Harry Maguire as the east London club continue to reinvest in their squad following the £105m departure of Declan Rice.
Ward-Prowse made over 400 appearances for Southampton and captained the club last season when they were relegated from the Premier League after finishing bottom.
"I'm buzzing to be here," Ward-Prowse said. "It's great to be here and I'm looking forward to getting going."
Ward-Prowse, who has 11 caps for England, spent two decades at Southampton. He joined the south coast club's academy aged eight and made his senior debut at 16 in 2011.
He has scored 17 goals directly from free-kicks in the Premier League, one fewer than his childhood hero -- former Manchester United midfielder David Beckham, who holds the record.
"This is a club that has been on the rise for a number of years now," Ward-Prowse said. "Coming off the success in the Europa Conference League last year, you can feel there is real momentum around this club.
"It's great to be a part of it and I can't wait to play my role in the games to come."