Dimarco was still level with the San Siro centre circle, on the left side of the field, when he spotted Frosinone goalkeeper — and lifelong Inter fan — Stefano Turati off his line and lobbed him with an outrageous strike.
Inter goalkeeper Yann Sommer put his hands on his head in disbelief, while coach Simone Inzaghi turned round and beamed broadly at his bench.
Earlier in on Sunday, defending champions Napoli tumbled to their third defeat of the season to pile the pressure on coach Rudi Garcia as an added-time goal saw lowly Empoli win 1-0 at the Stadio Diego Armando Maradona.
Viktor Kovalenko scored with a stunning strike late on for Empoli, who had lost eight of their previous 11 matches - and the boos rang out in Naples.
All three of Napoli's losses have come in front of their own fans and they've only won one match at home since the end of August.
They lost just two matches at home on their way to the title last season under Luciano Spalletti.
Napoli could have moved third, following AC Milan's 2-2 draw at Lecce on Saturday, but they were still without forward Victor Osimhen and Garcia opted to start with another key player on the bench, resting Khvicha Kvaratskhelia.
There were boos when Garcia's name was read out before the match and more jeers after a drab first half.
Garcia's experiment clearly hadn't worked and Kvaratskhelia was brought on early in the second period.
Napoli looked more dangerous but Empoli goalkeeper Etrit Berisha did well to pull off a miraculous save with an outstretched leg to deny Kvaratskhelia in the final minute.
Worse was to come for Napoli moments later as Tyronne Ebuehi pulled the ball back from the byline for Kovalenko and the Ukraine midfielder curled in a magnificent strike off the inside of the far post for his first goal for Empoli.