The Owls had taken the lead through a Steven Fletcher spot-kick in the first half before two Hugill goals in four minutes wrapped up the points for the visitors.
The Owls were awarded a penalty in the 23rd minute when Fernando Forestieri was hauled down by Grant Hall as a cross came in and Fletcher took responsibility to stroke the ball into the bottom corner for his third goal of the season.
At the other end, Ryan Manning cracked a free-kick which went narrowly wide as QPR threatened a leveller.
The visitors came close to an equaliser just before the break through Nahki Wells, who collected a clipped ball over the top and fired a left-footed volley from a tight angle which Keiren Westwood had to palm away.
Ilias Chair threaded Wells through on goal again early in the second half but Westwood was out quick to make the save.
The visitors grabbed the equaliser on the hour mark. Wells' pinpoint pass found Hugill beyond the defence and the West Ham loanee coolly rounded Westwood and passed the ball into the net.
Hugill – named in the starting line-up after a scoring substitute appearance in the win over Wigan last week – stunned Hillsborough when he doubled his tally just four minutes later.
This time Manning evaded the offside trap before his low cross found Hugill unmarked inside the box to tap home.
Kadeem Harris, who had been monitored well by the QPR defence, nearly struck an equaliser when he collected the ball on the left and darted inside but fired his shot over the bar.
QPR held onto their one goal lead to record back-to-back victories in the Championship and leapfrog Wednesday in the table.