Asalam o Alikum!
I try to find the answer to my question using stackexchange, Google, and another search engine, but I did not any.
I have a very simple question, If during praying earthquake hit, can I stop praying and find the shelter?
All praise and thanks are due to Allah, the Lord of the worlds. We cannot find words to praise Him, as He only sees fit how laudation should be addressed to Him. We seek refuge in Allah from the evils within ourselves and the evils of our bad deeds. Whosoever Allah guides will never be led astray, and whosoever He leads astray will never find guidance. We bear witness that there is no god but Allah, the One without any associate, and We bear witness that Muhammad is His Messenger and bondman, peace and blessings be upon him, his kith and kin, his Companions and all those who follow their guidance until the Day of Judgment.
Your Question: If an earthquake hits during the prayer, can we stop praying?
Answer: No, this is not valid excuse for abandoning prayer. In fact, it is recommended to pray when one of these signs happens, such as eclipses, earthquakes, violent storms, persistent and frightening winds, and destructive floods, because it is narrated in a saheeh report from Ibn ‘Abbaas (may Allah be pleased with him) that he prayed when an earthquake struck Basra, offering a prayer like the eclipse prayer. Then he said: This is how prayers should be offered at the time of these signs.
It is recommended to pray at all times of alarm, such as when there are strong winds, earthquakes, darkness, and ongoing rain, because they are causes of alarm and fear.
Earthquakes are one of the great signs of Allah in this universe, with which He tests His slaves as a reminder or to instil fear of Him or as a punishment. Man must remember, when the signs occur, his weakness, incapability, humble status before Allah and his need of Him, so he turns to Allah, may He be exalted and glorified, in supplication, beseeching and humility, in the hope that Allah will lift this great distress from the people.
"Verily, We sent (Messengers) to many nations before you (O Muhammad صلى الله عليه وسلم). And We seized them with extreme poverty (or loss in wealth) and loss in health (with calamities) so that they might humble themselves (believe with humility)."
What must be done at the time of an earthquake or other calamity, or an eclipse, strong wind or flood is to repent to Allah, may He be glorified, and to beseech Him and ask Him for well-being, and to remember Him a great deal and ask Him for forgiveness, as the Prophet (blessings and peace of Allah be upon him) said at the time of an eclipse: "When you see that, then turn to remembrance of Allah and call upon Him and ask for His forgiveness.”
It is recommended for everyone to beseech Allah in supplication and so on when earthquakes and similar events, such as thunderbolts and strong winds, happen, and to offer prayers on his own in his house lest he be negligent, because the Prophet (blessings and peace of Allaah be upon him) said, when the wind blew strongly: “O Allah, I ask You for its good and the good of what is in it and the good of what it is sent with, and I seek refuge in You from its evil and the evil of what is in it and the evil of what it is sent with.” Narrated by Muslim.
Narrated Abu Musa:
The sun eclipsed and the Prophet got up, being afraid that it might be the Hour (i.e. Day of Judgment). He went to the Mosque and offered the prayer with the longest Qiyam, bowing and prostration that I had ever seen him doing. Then he said, "These signs which Allah sends do not occur because of the life or death of somebody, but Allah makes His worshipers afraid by them. So when you see anything thereof, proceed to remember Allah, invoke Him and ask for His forgiveness." (Bukhari 2:167)
If there occur several events, which make offering of Signs Prayers obligatory, one should offer Signs Prayers for each of them. For example, if solar eclipse as well as an earthquake take place, one should offer separate Signs Prayers for each of these two occurrences.