Verse For Breaking Free From Hell 
If [a] person desires [to] understand fully, [the] three periods’ [i.e. past, present and future (teachings of)] all Buddhas, [one] should contemplate [the] Dharma realm’s [i.e. universe] nature, [to] all [be] only [by the] mind created.
– Forest [Of] Awakening Bodhisattva
(Flower Adornment [Avataṃsaka] Sūtra:
Chapter 19 [On] Ascent [To] Yama Heaven Palace)
Part 1: As written in the ‘Record Of Pure Land Sages’《净土圣贤录》, there is the public case (公案) of Wáng Shì (王氏) from Héféi (合肥) in the Sòng Dynasty (宋朝). For a long time, she easily and comfortably cultivated Pure Land practice, upholding the practice of being mindful of Amitā[bha] Buddha’s name [i.e. Āmítuófó; 阿弥陀佛]. She also upheld the ‘Verse [For] Breaking [Free From] Hell’ (破地狱偈), as above.
One night, she dreamt of the Lord Of Hell (i.e. King Yama; 阎罗王) coming to thank her, saying he is indebted to the meritorious virtues from her upholding of the verse, with which sentient beings within hell who were born in good paths were many. Her much meritorious virtues from (mindfulness of Āmítuófó and) upholding the verse were dedicated to hell-beings for alleviating their suffering. Later, when bedridden, she upheld the Buddha’s name without stopping. Then departed, all relatives, and her maid, dreamt of her informing, ‘I have already attained birth in Pure Land!’
[Original Text (原文): ‘宋王氏：王氏，合肥马永逸妻也。永逸修净业，事载马玕传。王氏亦持佛名，行天竺十念法。又尝持破地狱偈。偈出华严经，云，若人欲了知，三世一切佛，应观法界性，一切唯心造。一夕，梦地狱主者来谢云，幸蒙持偈功德，狱中众生出生善道者多矣。其后寝疾，持佛名不绝口。既逝，诸亲属，及其侍女，皆梦王氏报云，吾已得生净土矣。（乐邦文类）’ -《净土圣贤录》]
On the origin of the verse in use, in ‘Record [Of The] Essential Mirror’《宗镜录》by the Pure Land Tradition’s 6th Patriarch Great Master Yǒngmíng (净土宗六祖永明大师), there was mention of a man named Wáng [Mínggàn] (王明干) [in the Sòng Dynasty (宋朝), who became a monastic named Sēngjùn (僧俊)]. He was however without practice of observing the precepts (戒行) or cultivation of good causes (善因), who died due to a minor illness.
[Three days later, he revived miraculously, as he wailed in repentance. He said that when he was about to die, two hell officials chased him to demand for his life.] When led to hell, at its gates, he met a monastic who said he is Kṣitigarbha Bodhisattva (地藏菩萨), [and that when he was at Jīngchéng (京城), he once copied an image of him. Although he did not prostrate or make offerings before it, he will be repaid for his meritorious virtues.]
He instructed him the verse above, saying that if he is able to ‘recite [or] hear this verse, [he will be be] able [to] break [free from the] suffering of hell.’ (诵得此偈，能破地狱之苦。) [He said it is able to ‘close hell’s gate, and open the path to Pure Land’ (能闭地狱门，能开净土道) [if followed by mindfulness of Āmítuófó. Having said this, he disappeared.]
When he then [entered the city and] met the King Yama (阎罗王), he was asked what meritorious merits he has, [as he encountered the Dharma when alive]. He answered that he ‘only received a four-lined verse’ (唯受得一四句偈) , and stated it as above. The King then released him. ‘When reciting this verse, where [its] sound reached, those [who] received suffering all attained liberation [from it].’ (诵此偈时，当声至处，受苦之人，皆得解脱。)
King Yama hurriedly asked him to stop [probably as the others did not karmically deserve the teaching yet], and released him to the human world, as he revived. Later, when he examined the verse, did he know that it is from the Avataṃsaka Sūtra. After this, towards [Kōngguān (i.e. Emptiness Contemplation) Monastery‘s (空观寺) Dharma Master Sēngdìng (僧定) and] all monastics, he spoke of this matter, and all listeners gave rose to the aspiration to faithfully receive the sūtra.
[Original Text (原文): ‘纂灵记云：京兆人，姓王失其名。原无戒行，曾未修善因，患病致死。为二人引至地狱，于地狱门前见一僧，云是地藏菩萨，乃使诵偈云：若人欲了知，三世一切佛。应观法界性，一切唯心造（华严经夜摩天宫品，觉林菩萨之偈）。菩萨授经已，谓之曰：诵得此偈，能破地狱之苦。其人诵已，遂入见王。王问此人有何功德？答云：唯受得一四句偈。具说如上。王遂放逸，诵此偈时，当声至处，受苦之人，皆得解脱。’ -《宗镜录》]
This verse works as taught, as it enables the desperate hell-beings, who do not know any way out, to reflect and realise that their great karmic suffering is created and sustained by their own minds. Knowing so, they are able to repent sincerely, which clears negative karma that caused the suffering, and creates positive karma for breaking free from hell. This verse is thus named so.
The swiftest and easiest way to break free from hell is by direct and utmost sincere mindfulness of Āmítuófó, so as to connect to him and his blessings, to see him, and be guided by him to reach his Pure Land, as can be seen in an alternative ‘Verse [For] Breaking [Free From] Hell’ below, (among a few other versions). It works by instructing or reminding hell-beings to give rise to Faith in Āmítuófó’s power to save them, and the Aspiration to reach his Pure Land, by sincere Practice of being mindful of his name.
As Āmítuófó has immeasurable meritorious virtues, when connected to, he is able to share them directly to ‘dilute’ much but still limited negative karma, to empower quick departure from hell. Of course, as the intense suffering in hell makes it the most challenging place to be mindful of Buddha, it should be avoided in the first place.
Part 2: According to ‘Speaking [Of The] Three Pure Land Sūtras’《净土三部经讲话》, before the Táng Dynasty (唐朝), there was a Vinaya Master Xuántōng (玄通律师). When at a monastery to spend the night, he overheard someone in the next room reciting the verse below, and he recited along two to three times, thereafter forgetting about it.
Due to the breaking of precepts later, after death, he went to meet King Yama, who slammed the wooden ‘gravel’ for alerting all in the hall (惊堂木), and sternly said that as he was born where the Buddha’s teachings were propagated, if he had learnt any Dharma door, he should now take the high seat to proclaim it. While sitting himself, Master Xuántōng tried to think of the Dharma that he had learnt, but could not recall anything. However, he remembered the verse, which he recited.
Once the verse was said, King Yama immediately towards him prostrated, and said that this verse is the text with the Western Pure Land Of Ultimate Bliss’ Āmítuófó’s chief (or overall; total; general) meritorious virtues (总功德), that based on the meritorious virtues of reciting it, he can be exempted from evil fruit of hellish rebirth, to return to the human world, and have his lifespan extended.
Note that the verse summarises and reminds its listeners and readers of the power of Āmítuófó’s (其佛) fundamental vows (本愿力), on how the Three Provisions (三资粮) of Faith (信) in this teaching, Aspiration to be reborn in his Pure Land (愿:欲往生), and the Practice (行) of upholding his name (闻名:持名) should be given rise to by all (皆悉), for reaching his Pure Land (到彼国), so as to personally attain non-retrogression (自致不退转) for Buddhahood.
While the verse points out Āmítuófó’s meritorious virtues, they are also already fully contained in his name, which makes mindfulness of it meritorious and virtuous. When dying or due to shock after death, even those who were knowledgeable when well and alive are likely to forget most of what was learnt. However, if Āmítuófó’s name is upheld sincerely and regularly in everyday life, it will not be forgotten.
Therefore, if Āmítuófó’s name is remembered, there is no need to worry about not remembering any verses. What more, good (i.e. moral) Pure Land practitioners will reach his Pure Land swiftly, and not have to meet King Yama, while even the noble assembly from Pure Land will respect and praise those who are mindful of Āmítuófó’s name in everyday life. (Although there are various mantras for the same purpose of breaking free from hell, there is perhaps no shorter one than the name of Āmítuófó, which is already a supreme mantra. Learn about two more related verses at https://thedailyenlightenment.com/2018/12/lotus-sutra-verses-for-breaking-free-from-hell.)
Verse For Breaking Free From Hell 
[With] that [Amitā(bha)] Buddha’s fundamental vow’s power, hearing [of his] name [‘Āmítuófó’, with] desire [for] rebirth, all [will] reach that [Pure] Land [of his, to] personally attain non-retrogression [for Buddhahood].
– Śākyamuni Buddha
(Immeasurable Life Sūtra: Twenty-Fifth [Chapter On The] Ten Directions Prostrating [And] Meeting)
The Lotus Sūtra’s Verses For Breaking Free From Hell
觉林菩萨(唯心)偈 The (Mind-Only) Verses By Forest Of Awakening Bodhisattva
The Principle Of ‘Vow Now For Birth Now’
The Centrality Of Aspiration Within The Three Provisions
10 Related Sòng Pure Land Sages
Verses For Breaking Free From Hell
The Name Of Āmítuófó Is A Supreme Mantra