Mertens converted Lorenzo Insigne's square pass to score his 122nd goal for the club, in the process moving him clear of Marek Hamsik to sit alone in top spot as its all-time leading goalscorer.
Fabian Ruiz's goal at San Siro in the first leg prior to the coronavirus outbreak had put Napoli in control of the semi-final tie at the halfway stage, only for Inter to erase the deficit inside two minutes of the return meeting.
Christian Eriksen's curling corner slipped beyond the players gathered at the front post and also David Ospina, quickly levelling the tie.
However, Napoli’s goalkeeper overcame the early embarrassment to play a key role in helping his side progress in the competition.
Ospina made key saves to deny Romelu Lukaku and Antonio Candreva before setting up the equaliser late in the first half, his well-directed clearance triggering a swift counter-attacking move that caught Inter cold.
His precise kick picked out the run of Insigne, who unselfishly passed the ball across for the advancing Mertens to make history four minutes before half-time.
Not done there, Ospina produced a superb save late in the second half to deny Inter a second goal that would have seen them, rather than Napoli, seal a trip to Rome.