Masuaku, 28, made 129 appearances across six seasons with the Hammers, scoring two goals, since arriving from Greek side Olympiacos in August 2016.
The Besiktas squad is coached by former Barnsley and West Bromwich Albion manager Valérien Ismael and Masuaku could make his debut in the Super Lig match against Kayserispor on Saturday, alongside Wout Weghorst who joined the club on loan from Burnley this summer.
The 28-year-old DR Congo international had been at West Ham since 2016 but struggled to hold down a regular first-team place due to injury, inconsistency and the form of first-choice left-back Aaron Cresswell.
He has been shuffled around the team by West Ham manager David Moyes, often playing on the left-side of midfield to utilise his pace and crossing abilities and to counter his lack of defensive nous.
The loan deal leaves West Ham with one of the smallest squads in the Premier League, and very thin on cover across defence, especially as Issa Diop is expected to be sold to Fulham at some point before the end of the transfer window.