Ramsey leaves the club after the 1-0 loss to Derby left QPR in 13th in the English second tier.
"We've made this decision in the best interests of the football club," said QPR director of football Les Ferdinand.
"It's no secret that we expected to sell some key players in the summer transfer window, and as such, our target at the start of the season reflected that.
"We're all desperately disappointed it hasn't worked out with Chris. He has had to deal with this shift in expectation and has worked incredibly hard in doing so."
Rangers added that the search for a replacement would immediately begin but that Warnock would take over on a temporary basis.
He guided Rangers to the Championship title and Premier League football in 2011 before losing his job under the new regime of Tony Fernandez.
He has since been at Leeds and Crystal Palace, but returned to Loftus Road to work as an adviser to Ramsey last month.
Warnock's first game will come at home to Preston on Saturday.