Riazur Hussain and Haribur Rahman, both of Limehouse, east London, pleaded guilty to arson while being reckless as to whether lives would be endangered.
The court was told that on 12 June last year, the boys, both 17 at the time, poured two pints of petrol over the front door of a house next door to where Rahman's family lived, and put a match to it. Hussain had a grudge against a girl who lived there.
Both then stood laughing as they watched the fire brigade rescue the family. Later, they told police racists were responsible for the attack.
Mohammed Ali, 66, his wife, Bibi, and their three children - the girl, aged 14, and her brothers aged 16 and 11 - had to scramble to safety down ladders or escape through the front door after the blaze had been extinguished.
The family all suffered from smoke inhalation. Mr Ali was left with a burnt earlobe, burns to his upper lip, a burn on his forearm and a singed beard.
The arsonists had earlier witnessed a similar scene while watching Death Warrant, a film shown on satellite television which is also available on video. Hussain told detectives: 'We watched the film at 11.30pm. I got excited and we just done it.'
The court was told that Hussain suggested to his friend that they carry out a copycat attack. Simon Wild, for the prosecution, said pounds 2,000 damage was caused.
Passing sentence, Judge Paul Collins told the defendants: 'In my judgment it would be an outrage if these offences were not visited by custodial sentences.'
He added: 'This is another piece of evidence for those who believe some crimes are committed to imitate crimes shown on videos.'Reuse content