Introduced as a 17th-minute substitute for the injured Steven Fletcher, the Portuguese striker broke the deadlock in the 64th minute when, with City appealing for offside, he latched onto a long clearance from goalkeeper Cameron Dawson to fire past Niki Maenpaa from inside the box.
The shaken home side had not recovered when Joao tricked his way past Adam Webster and fired in from 12 yards to make it 2-0.
Matty Taylor reduced the arrears by smashing home a 79th-minute penalty after Callum O’Dowda had been brought down by Josh Onomah. But, despite frantic late efforts, the hosts could not conjure up an equaliser in a game that could have gone either way.
Both sides passed up golden scoring opportunities in the first half. The first fell to Wednesday after 10 minutes when Adam Reach got in behind defender Lloyd Kelly only for his volley to be blocked by advancing goalkeeper Maenpaa.
Moments later there was an even better chance for City as a wayward defensive pass left Famara Diedhiou all alone in a central position inside the box. The striker looked surprised not to be flagged offside and failed to beat goalkeeper Dawson, who spread himself to save a low drive.
City were on top and Kelly sent a left-foot shot across goal and against the far post from an angle after 15 minutes. In the goalmouth scramble that followed, both Nathan Baker and Webster had efforts blocked.
Jamie Paterson’s long-range shot brought another save from Dawson in the 33rd minute but Wednesday were starting to click as an attacking force.
Reach almost caught out Maenpaa with a 25-yard shot that appeared to swerve, with the goalkeeper blocking with his legs. From the resulting corner Tom Lees nodded across goal and Joao somehow missed his header from point-blank range.
The second half began with another great opportunity for Wednesday when Joao set up Barry Bannan inside the box. The midfielder elected to go for a delicate chip and his effort lacked the pace to beat the unsighted Maenpaa.
City were quick to respond and when Taylor’s shot was blocked, Josh Brownhill fired over from the edge of the box.
Joao’s first goal had City head coach Lee Johnson gesturing angrily at the officials, convinced it was offside.
He reacted to the second with a triple substitution, sending on O’Dowda, Andreas Weimann and Marley Watkins, but despite Taylor’s penalty and seven minutes of stoppage time it was Wednesday who claimed the points.