Freeman, 27, is United's first signing of the summer since they finished second in the Championship (second tier) last season to earn promotion to the top flight.
The playmaker scored eight goals in 48 games for QPR last season and struck against United when the teams met at Bramall Lane in February 2018.
"Luke gives us balance off his left foot. His stats add up and all the eyes we've had on him have come back with glowing reports," manager Chris Wilder told the club's website https://www.sufc.co.uk/news/2019/july/freeman-signs.
"He's one of the best players in the Championship and he can play in a number of positions. Luke is ideal to complement what we already have at the club, he will be a good fit for us."
Sheffield United start their Premier League campaign at Bournemouth on Aug. 10.
(Reporting by Shrivathsa Sridhar in Bengaluru; Editing by Alison Williams)