Sassuolo led through a Domenico Berardi penalty, but Dzeko made an immediate impact by heading in the leveller with his first touch after entering the action in the 58th minute.
The Bosnia striker was then brought down by goalkeeper Andrea Consigli in the box and Lautaro Martinez dispatched the resulting spot kick.
"I have scored a lot of goals but I do not remember if I have ever scored with the first touch, there is a first time for everything," Dzeko told DAZN.
"I know how much I still have to offer, Inter know that too and decided to sign me to score goals."
Inter rose to second place on 17 points, one point behind leaders Napoli, who travel to Fiorentina on Sunday. Sassuolo are 13th with seven points.
Inter's victory meant they scored at least two goals for a 12th consecutive league match, overtaking their previous longest run of 11 games from 1943.