Rangers chairman Tony Fernandes accepted the former Tottenham boss' resignation just a day after tweeting there would be "no more cheque book" as the transfer window closed on Monday.
Redknapp had been under intense pressure for months with QPR languishing in a relegation dogfight, fending off what he claimed was a club insider trying to undermine his position.
Redknapp continuously claimed to have the backing of chairman Fernandes despite being rumoured to be one game from the sack on three separate occasions this season.
Head of football operations Les Ferdinand has taken temporary charge while QPR seek a new manager.
"Sadly I need immediate surgery on my knee which is going to stop me from doing my job in the coming weeks," said Redknapp in a QPR statement.
"It means I won't be able to be out on the training pitch every day, and if I can't give 100 per cent I feel it's better for someone else to take over the reins.
"My relationship with Tony Fernandes has been one of the highlights of my footballing career and I wish the club every success
I am confident they will survive in the Premier League this year.
"I have had such a fantastic time at QPR
I would like to thank the Board, the players and all my staff, and especially the supporters who have been absolutely fantastic to me since I arrived at the club for their tremendous support."
Source : PA
Source: PA