The Turkish side announced on their website that the 27-year-old had signed a five-year deal for a fee of 4.25million euros (£3.86m).
Feghouli spent one season at West Ham after joining from Spanish outfit Valencia last summer.
The Algeria international scored four goals in 27 appearances, including one in the first game at the London Stadium in July 2016.
A statement on the Premier League club's website read: "West Ham United would like to thank Sofiane for his efforts and wish him well in his future career."