Roberto Mancini's men left it late at the Britannia Stadium, but a coolly-taken Pablo Zabaleta strike ensured the 2011 winners avoided an unwanted replay in their quest to retain the Premier League title.
However, the shine was taken off the victory as the Belgian pulled up after 40 minutes and had to be withdrawn.
Kompany was upbeat though, and tweeted: "On to the next round and a fifth consecutive clean sheet! I hope I won't be out for too long but the team seems as strong as ever."
Assistant manager David Platt commented: "I think we'll lose Vincent Kompany for a little while. We will have to assess the injury over the next 24 hours to get a better picture but he won't play against QPR.
"It's difficult to go into a market and just pick people out just because you have an injury. We’ll have to regroup and the manager will decide," the ex-England international continued.
The 2011 FA Cup winners will continue their campaign with a fifth round tie at home to Championship side Leeds, who upset Tottenham Hotspur on Sunday.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.