The London Evening Standard says Nasri, who played under Pellegrini at Manchester City, is undergoing a medical prior to signing a short-term contract with the Hammers.
The 31-year-old midfielder would not be eligible to play until January 1, but is permitted to train with any club from this month.
In February, Nasri was given a six-month ban after receiving an intravenous treatment at a Los Angeles clinic in breach of the World Anti-Doping Agency’s rules.
The former France international received the treatment in December 2016 while on holiday. At the time, the he was playing for Sevilla, on loan from City.
UEFA in August won an appeal for the ban to be increased to 18 months, backdated from July 1, 2017, although Nasri has played since then.
Nasri made eight appearances for Antalyaspor in Turkey between signing in August 2017 and leaving in January this year.
Know more about Sport360 Application