New iOS app is now available on the App Store.
Menu
What Is Hijra? The Prophet's Migration Explained for Kids
Islamic Stories & Lessons

What Is Hijra? The Prophet's Migration Explained for Kids

Mostafa S · June 21, 2026

So my nephew asked me last week why Muslims have a whole calendar that starts counting from some guy moving to a different city. Fair question honestly. Most people, if they moved house, nobody starts numbering years after it.


But the Hijra wasn't really a move. Not in the way we use that word now. It was 622 CE, Prophet Muhammad had to get out of Makkah because staying meant he'd probably be killed, and a lot of the Muslims around him were already being starved or beaten just for believing what they believed. His own uncle Abu Lahab was one of the people working against him, which, imagine that for a second. Family turning on you over what you believe in.


Why Makkah Turned Against Him

Makkah was making good money off the idols people worshipped there. Pilgrims came from all over Arabia, paid for it basically, kept the local economy running. So when this one man stands up and says, actually there's only one God and these statues do nothing, the people in charge didn't just disagree. They panicked. Whole business model on the line.


Things got bad enough that Allah told him to leave. Not as a defeat. As a way out, toward something that hadn't been built yet.

For years before that, the early Muslims just... held on. Got beaten, got mocked, kept going anyway. There's something kids should sit with there. Not everything that hurts means you're losing.


The Night He Actually Left

Here's the part that sounds made up but isn't. Makkah's leaders planned to kill him, and they were smart about it too, they picked one man from each major tribe so no single family could be blamed and seek revenge. Spread the guilt around. Cowardly, if you ask me, but calculated.


Allah told the Prophet about the plan before it happened. So that night his cousin Ali, still basically a teenager, agreed to lie in Muhammad's bed, wrapped in his cloak,

knowing full well there were men outside planning to attack whoever was under those covers. Sit with that for a second. That's not just bravery. That's a specific, terrifying kind of loyalty.


Muhammad walked right past the men watching his house. They didn't even notice. Met up with his closest friend, Abu Bakr, and the two of them didn't even head toward Madinah first. They went south. Threw off anyone tracking them.


Three Days, One Cave, A Spider

They hid in a cave called Thawr for three days. Meanwhile back in Makkah people were furious, offering a hundred camels to whoever found him and brought him back. A hundred camels was serious money back then.


At one point, searchers got right up to the cave entrance. Abu Bakr was shaking, whispered something like, if they just look down they'll see us. And the Prophet told him, calm as anything, don't grieve, Allah is with us. That line actually shows up in the Quran later, Surah At-Tawbah, verse 40.


What happened next is the part that gets me every time. A spider had spun a web right across the entrance. A pigeon had nested there too, eggs and everything. The men looking for them saw an undisturbed web, a settled bird, and just... left. Figured nobody could've gone in there recently.

A spider and a bird. That's it. That's the whole miracle.


Getting to Madinah

After three days they kept moving north, guided by a tracker they'd hired, through rough desert heat. Not a comfortable trip by any measure.

When they got close to Madinah, the welcome was something else entirely. People had been waiting days, maybe longer. Kids climbing up onto roofs just to see him arrive. Women singing. The whole town basically erupted with joy.


The people of Madinah got a special name after that, the Ansar, meaning the Helpers. And they earned it. They didn't just say nice things and offer a place to sleep. They split their homes, their food, their money, with people who'd shown up from Makkah with basically nothing.


Why This Still Matters

A few reasons, really.


The Islamic calendar starts here. Every Hijri year is counted from this exact migration, which is why you'll see dates written as AH, after Hijra.


Also, Madinah is where things actually got built. The Prophet put up the first mosque with his own hands. He worked out an agreement between the different groups living there, something historians still point to as one of the earliest written constitutions anywhere. A man who left Makkah running for his life ended up leading an entire functioning community within a couple years.


And there's just the bigger lesson underneath all of it. Leaving doesn't mean losing. Sometimes the place you're forced out of isn't where you were supposed to stay anyway.


What Kids Can Actually Take From This

Abu Bakr was scared. Genuinely, visibly scared, in that cave. He was a grown man and his voice was shaking. That matters because it means fear isn't the opposite of faith.


You can be terrified and still trust Allah. That's actually what courage looks like most of the time, not the absence of fear, just choosing to keep going anyway.

Ali's loyalty is worth talking about too. He didn't know for certain he'd survive that night. He did it anyway because of who he loved and trusted.


And then the Ansar. Total strangers who gave up half of what they owned for people they'd never met. That's generosity that's hard to even imagine pulling off today.


Conclusion

The Hijra wasn't a comfortable story and it wasn't supposed to be. Fear, heat, betrayal, a plan to assassinate a man hiding in a cave with nothing but a friend and a spiderweb for protection. And out of all that came one of the most important civilizations history has ever seen.


That's really the whole point for kids and grown-ups both. Doing the hard, right thing for Allah's sake doesn't mean you're walking it alone, even when it feels that way in the moment.


You can find more stories on Islamic Galaxy, with Islamic Galaxy your kids can learn whatever they want on their own with games, videos, or even our blogs, you can subscribe to learn more.


Frequently Asked Questions

What is the Hijra in simple words?

It's Prophet Muhammad's migration from Makkah to Madinah in 622 CE, made necessary by persecution. It marks year one of the Islamic calendar and the start of the first organized Muslim community.

What happened in the cave during the Hijra?

He and Abu Bakr hid in Cave Thawr for three days while pursuers searched nearby. A spider's web and a bird's nest at the entrance convinced searchers no one had gone inside.

Why does the Hijra still matter to Muslims today?

It marks the start of the Hijri calendar and shows that real sacrifice for faith leads somewhere meaningful. The Madinah community built afterward became the foundation for Islam spreading worldwide.