The centre-back 25, follows Swedish striker Marcus Antonsson to Elland Road as new Whites head coach Garry Monk continues his summer re-building process.
Monk and Bartley worked together during Monk’s managerial reign at Swansea with the centre-back signing a new a three-year deal at the club under Monk in July 2014.
But the defender made only eight appearances for the Welsh side last season and arrives at Leeds a matter of hours after United confirmed the departure of fellow centre-back Giuseppe Bellusci to Italian side Empoli on a season-long loan, with a view to a permanent deal next summer.