The 27-year-old Cameroonian international also spent last year with the Hammers, making 31 appearances in all competitions.
It was also confirmed by West Ham United co-owner David Gold as he welcomed the Cameroonian back to Upton Park.
The Premier League club also have the option of extending the deal for a further season.
Earlier this year, Song announced his international retirement, citing a wish to focus on rebuilding his domestic career.
Song joined Barcelona for £15m from Arsenal in August 2012, made 65 appearances for the Catalan side prior to his first loan switch to the Hammers in 2014.
He becomes West Ham’s eighth arrival during the transfer window, joining the goalkeeper Darren Randolph, defenders Angelo Ogbonna and Carl Jenkinson and midfielders Pedro Obiang, Dimitri Payet, Manuel Lanzini and George Dobson at Slaven Bilic’s team.
West Ham is also looking to bring 3 more players on the deadline day including Nikica Jelavic from Hull City and Davi Gold himself tweeted that, three new signings could be confirmed before the deadline.
It will be a busy day for West Ham United as it seems and the fans can be optimistic about the day after starting the season on a good note beating Arsenal and Liverpool at their home.