John MacDonald hurled a bottle containing petrol or some other flammable liquid through the window of a house in Elgin, in Moray, injuring all of those inside.
A judge told shaven-headed MacDonald, 43: “You continue to deny responsibility and in keeping with that position you have exhibited no remorse.”
Lord Stewart said at the High Court in Edinburgh: “I judge the only proper sentence is a long period of imprisonment.”
The judge said he noted that MacDonald had a criminal record but added there “nothing approaching the seriousness” of the latest offence.
MacDonald, from Elgin, but currently in prison, had earlier denied attempting to murder Alistair Brooks, Anne Roate, Daniel Doherty, Lisa Sharp and George Lindsay by wilfully setting fire to the flat on 12 December last year, but was found guilty by a jury.
The judge noted that four of the victims escaped with relatively minor injuries but that Mr Brooks suffered burns over a quarter of his body and continues to receive treatment.
He said the jury had accepted the lives of all those in the flat at the time of the bombing were endangered.
The fire brigade was at the scene quickly and a firefighter rescued Mr Brooks from the blaze which also damaged an upstairs property.
The court heard that MacDonald had previously been dating Ms Sharp but she had started a relationship with Mr Lindsay before the murder bid.
The judge said the motivation for the crime appeared to be “a grudge” MacDonald bore against Mr Lindsay.
He said there was no evidence of animosity between him and the others in the flat but the means of attack involved risk to all those in the house indiscriminately.
Lord Stewart said there must have been a degree of planning involved in the offence with the inference being that MacDonald tracked down Mr Lindsay and armed himself with the fire bomb.
The court heard that MacDonald was “not in a very good mood” on the night of the fire bombing of the flat.
Sentence had been deferred for background reports on MacDonald following his earlier trial.
Defence counsel Tony Graham said although MacDonald had previous convictions there was “nothing indicative of a pattern of public harm”.
“What we have is a one-off incident, albeit one that is serious,” he said.
He said in mitigation that MacDonald had led “a fairly uneventful life” and had a reasonable work record.
Mr Graham added: “We heard in evidence there were issues over a young lady.
“When he is released he will be a wiser and older man,” .