Former Luton boss Harford, who had a spell in caretaker charge of Rangers in 2007, will be Hart's number and their first game in charge will be against Sheffield United at Loftus Road on Saturday.
Magilton was suspended by the club over a dressing-room bust-up with midfielder Akos Buzsaky following the televised 3-1 defeat at Watford on December 7.
The 40-year-old strongly denied allegations of a head-butt, but after Buzsaky issued an 'either he goes or I go' ultimatum to chairman Flavio Briatore, Magilton's time was up after six months in charge.
Hart's appointment sees the Rangers managerial reins change hands for an incredible ninth time in just over two years since Briatore arrived at the club.
Permanent bosses John Gregory, Luigi De Canio, Iain Dowie, Paulo Sousa and Magilton have departed while Harford, Gareth Ainsworth (twice) and, in the last week, youth coaches Steve Gallen and Marc Bircham, have had spells as caretaker bosses.
Magilton was in charge for 23 games, Sousa lasted 26 and Dowie managed just 15.
Hart inherits a team lying 12th in the Championship, just three points from the play-off places, following a 2-2 draw at West Brom on Monday.
Hungary international Buzsaky, 27, did not feature at The Hawthorns, apparently due to a knee injury, and his future at the club remains unclear.
Coca Cola Ch'ship 09/10 Win Outright: QPR 50/1