Just one point and one place separated the two sides before kick off, and the game was decided when David Ospina conceded a spot kick midway through the second half, which Lukaku converted.
The two captains made an impact in contrasting fashions, as Napoli skipper Lorenzo Insigne was sent off for dissent following the penalty award and Inter goalkeeper Samir Handanovic made some decisive interventions to keep his side in front.
Yet Napoli pushed hard for an equaliser with 10 men and Andrea Petagna was denied a late leveller when his shot rattled the post in stoppage time.
The victory leaves Inter in second place, one point behind leaders Milan, while Napoli are fourth with 23 points.
Pressure was mounting on Inter coach Antonio Conte after his side's disappointing early exit from the Champions League, where they finished bottom of their group, but he has now overseen a run of five wins in a row in Serie A.
Napoli lost star striker Dries Mertens during a cagey first half, as the Belgian was worryingly forced off in tears with an ankle injury.
The game exploded into life in the final 20 minutes. Handanovic instinctively blocked a clever Insigne flick before Inter rushed up the other end to win the decisive penalty, as Ospina caught the foot of Inter wing-back Matteo Darmian. Insigne was furious about the decision and saw red for his reaction, but Napoli finished the stronger as Handanovic produced superb saves on Matteo Politano and Giovanni Di Lorenzo before the woodwork came to Inter's rescue in the dying minutes.