Defending champions Afghanistan, chasing 347 runs for victory, were 136 for five overnight but were dismissed for 224.
Medium pacer Mooney took 5 wickets for 36 in the Afghan second innings, giving him match figures of 10-81.
This was Ireland's fourth title in six editions of the Intercontinental Cup, but this victory marked the first time a team has won three ICC tournaments across three different formats in the same calendar year.
Ireland won the World Cricket League Championship title in the 50-over format in October and the ICC World Twenty20 Qualifier tournament in November, to go with the Intercontinental Cup title in the longer format.
Also Read
"I think it is all because of the hard work we put in. We are a pretty hard working bunch any time we come away on tour. Over the last four or five years, we have become a lot more professional outfit both on and off the pitch. I think that has helped us massively with our cricket."
However, things changed after lunch when Ireland decided to take the second new ball in the 82nd over at 199-5.
Porterfield's master stroke did the trick when Mooney ran through Afghanistan's lower order as the defending champion lost its last five wickets for 25 runs in just under 14 overs with Rahmat Shah left stranded at 86.
Brief scores:
Ireland 187 all out, 61 overs (John Anderson 55, John Mooney 33; Dawlat Zadran 4-44, Rahmat Shah 3-36) and 341 all out, 95.1 overs (Niall O'Brien 87, Ed Joyce 78, Kevin O'Brien 47; Mohammad Nabi 4-39)