Defender Jake Buxton twice headed the Rams level from corners after Lewis McGugan and Will Keane had put the Owls ahead.
And Darren Bent completed the comeback with a penalty after goalkeeper Kieren Westwood was sent off for bringing down Tom Ince.
This week marked the start of the Chinese New Year of the Ram, and the hosts were hoping it would bring them good fortune. But they were stunned when Wednesday took the lead in the 20th minute.
After being fouled by Will Hughes just outside the area on the right, McGugan took the free-kick himself and left Lee Grant rooted to the spot as the ball curled over the wall and inside the goalkeeper’s left post.
Derby had played some composed football without creating a chance but they had a great opportunity to level in the 25th minute when the ball broke off Hughes to Ince with Westwood stranded, but his shot hit a post before going behind off a defender.
Ince had scored five goals in his previous three games and nearly added another in the 39th minute with a 25-yard free-kick that Westwood just managed to claw away from under his crossbar.
The pressure was building on Wednesday and Hughes forced Westwood into another diving save when he cut in from the right in first-half stoppage time, but the home side got the goal their dominance deserved two minutes after the break.
Simon Dawkins forced a corner on the left and George Thorne’s swinging delivery was expertly glanced past Westwood from eight yards by Buxton.
Wednesday could not get hold of the ball and they were close to conceding again when a clearance fell to Jeff Hendrick just outside the area but his shot flashed wide.
But a mistake by Hendrick led to the visitors regaining the lead in the 55th minute when his loose pass set Keane racing into the box on the right and his shot beat Grant at his near post.
Derby responded with a double substitution and one of the new men, Craig Bryson, delivered the corner which Buxton headed down inside Westwood’s near post in the 68th minute.
The topsy-turvy game was settled in the hosts’ favour when Westwood was shown a straight red card and Bent scored from the penalty spot. A surging run and pass from Hughes had sent Ince in, and Westwood brought him down as he raced off his line.
Referee Darren Bond had no option but to dismiss Westwood and, after a three-minute delay while Wednesday brought on Chris Kirkland, Bent fired the spot-kick into the bottom-right corner for his seventh goal since his loan move from Aston Villa.