Longstaff, aged 27, has agreed a four-year contract at Elland Road, keeping him at the club until 2029.
The move follows Longstaff being restricted to just eight Premier League starts for Newcastle last season, having fallen behind other midfielders in the pecking order.
This transfer marks the end of Longstaff's 18-year association with his hometown club, Newcastle, where he came through the academy.
He is Leeds' fifth summer signing, joining Lukas Nmecha, Jaka Bijol, Sebastiaan Bournow, and Gabriel Gudmundsson.