Striker Borriello follows compatriot Antonio Nocerino to Upton Park after the midfielder made a similar switch from Milan earlier in the day.
Borriello joined Roma from Milan for £10million in July 2011 following a successful loan spell, but has struggled to establish himself at the Stadio Olimpico.
The 31-year-old has spent time at Juventus and Genoa on loan, and scored 12 goals while at the latter for the duration of last season.
However, the forward, capped seven times by Italy, has managed just one goal in 11 league appearances for Roma this term.
West Ham boss Sam Allardyce will hope Borriello can recapture his best form alongside Andy Carroll up front as the Londoners, who have won just one of their last nine Premier League matches, battle to avoid relegation.
Borriello said goodbye to Roma fans on his official Twitter page on Friday, but left his destination out of the message.
"A salute to all the fans of Roma," he wrote. "These have been fantastic months, crowned by a wonderful record. Thank you all."
Roma also confirmed the move in a statement on Saturday, adding that the player has moved for a fee of 0.7million euros (£580,000).
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.