The Intercontinental Cup loss drops Ireland from first to second in the table with two matches to go, Ireland next playing the Netherlands in August.
The winner of the group will play off against the lowest ranked Test side (currently Zimbabwe) in 2018 for full status.
The three-day loss is only Ireland's third in the 13-year history of the tournament.
Resuming their first innings on 170-7 - still 367 runs in arrears - John Anderson showed the necessary application as he scored an unbeaten 61 from 175 balls.
He has now passed the 50 mark in all five matches he has played in the competition.
He received admirable support from the tail, sharing stands of 43 with Andrew McBrine (18) for the eighth wicket and 41 for the last with Peter Chase (18) as Ireland added 91 to their overnight total.
The determination with which the Irish tail had resisted Afghanistan and leg-spinner Rashid Khan - who failed to add to his five-wicket tally - offered hope the Irish could mount a spirited resistance with the bat.
It was not to be, however, as Mohammed Nabi took six wickets in Ireland's second innings, and teenage leg-spinner Rashid 3-44, leaving both with a match haul of eight wickets apiece.
The dismissals of Anderson and Joyce in the same Nabi over seemed to knock all resistance out of the Irish, with Niall O'Brien and Gary Wilson the joint top scorers with only 15 apiece.
Ireland's next match in the competition is against Netherlands at home in August before they finish with a clash against Scotland in the UAE.
They will now have to rely on results elsewhere - hoping either Hong Kong or UAE can do them a favour - if they are to have any hope of retaining their title and going forward to the Test Challenge.
Before then, they will face England in two one-day internationals at Bristol and Lord's on 5 and 7 May.

Profits at the retail partnership, which also owns Waitrose supermarkets, were held back by greater investment and by matching prices of competitors.
Profit before tax and bonuses was Â£353.8m for the year to 28 January, down 3.8% from the previous year.
The bonus pool for the firm's workers was Â£165.2m or 14% of salary, down from 18% last year.
The partnership is owned by its 77,217 staff, who receive a share of any profits at the end of the company's financial year.
Despite what the firm called "difficult economic conditions", total sales at its John Lewis department stores grew 3% while those at its Waitrose supermarkets rose 8.6%.
Like-for-like sales, excluding VAT and the effect of new store openings, rose by 3% at Waitrose, but fell at its department stores by 0.6%.
The partnership said it had created 4,400 net new jobs in the year, with a further 1,900 expected this year.
"Profound changes are taking place in the retail sector and importantly this was a year when we upped the pace of innovation and investment," said chairman Charlie Mayfield.
"That came at the price of some short-term profit, but leaves us in a good place at the start of this year."
The trust-owned partnership said it opened 29 new Waitrose stores last year, as well as a new John Lewis department store in Stratford, East London.
The firm has been rolling out new store formats, including Waitrose convenience stores at petrol stations, and John Lewis "at home" stores, which specialise in homewear.
Waitrose continued to expand its online operation with a new warehouse in Acton, West London, while online sales at John Lewis increased by 26.3%.
However, the company was forced to spend Â£23.8m on its "Never Knowingly Undersold" promise due to price competition on the High Street.
Ireland's hopes of qualifying for the Test Challenge - and the chance to become a full-member nation of the ICC - suffered a serious blow as they slumped to an innings and 172-run defeat by Afghanistan in Greater Noida.
[NEXT_CONCEPT]
John Lewis has reported a fall in annual profits and cut its staff bonus for the first time in three years.