There was no king in Israel at that time. In those days the tribe of Dan was looking for territory to claim and settle in because they had not yet received any land of their own among the tribes of Israel.
So the people of Dan chose five qualified men out of all the families in the tribe and sent them from the towns of Zorah and Eshtaol with instructions to explore the land and spy on it. When they arrived in the hill country of Ephraim, they stayed at Micah's house.
References for Judges 18:2
While they were there, they recognized the accent of the young Levite, so they went up to him and asked, "What are you doing here? Who brought you here?"
He answered, "I have an arrangement with Micah, who pays me to serve as his priest."
They said to him, "Please ask God if we are going to be successful on our trip."
The priest answered, "You have nothing to worry about. The Lord is taking care of you on this trip."
So the five men left and went to the town of Laish. They saw how the people there lived in security like the Sidonians. They were a peaceful, quiet people, with no argument with anyone; they had all they needed. They lived far away from the Sidonians and had no dealings with any other people.
References for Judges 18:7
When the five men returned to Zorah and Eshtaol, the people asked them what they had found out.
"Come on," they replied. "Let's attack Laish. We saw the land, and it's very good. Don't stay here doing nothing; hurry! Go on in and take it over!
When you get there, you will find that the people don't suspect a thing. It is a big country; it has everything a person could want, and God has given it to you."
So six hundred men from the tribe of Dan left Zorah and Eshtaol, ready for battle.
They went up and camped west of Kiriath Jearim in Judah. That is why the place is still called Camp of Dan.
They went on from there and came to Micah's house in the hill country of Ephraim.
Then the five men who had gone to spy on the country around Laish said to their companions, "Did you know that here in one of these houses there is a wooden idol covered with silver? There are also other idols and an ephod. What do you think we should do?"
So they went into Micah's house, where the young Levite lived, and asked the Levite how he was getting along.
Meanwhile the six hundred Danite soldiers, ready for battle, were standing at the gate.
The five spies went straight on into the house and took the wooden idol covered with silver, the other idols, and the ephod, while the priest stayed at the gate with the six hundred armed men.
When the men went into Micah's house and took the sacred objects, the priest asked them, "What are you doing?"
They told him, "Keep quiet. Don't say a word. Come with us and be our priest and adviser. Wouldn't you rather be a priest for a whole Israelite tribe than for the family of one man?"
This made the priest very happy, so he took the sacred objects and went along with them.
They turned around and started off, with their children, their livestock, and their belongings going ahead.
They had traveled a good distance from the house when Micah called his neighbors out for battle. They caught up with the Danites
and shouted at them. The Danites turned around and asked Micah, "What's the matter? Why all this mob?"
Micah answered, "What do you mean, "What's the matter?' You take my priest and the gods that I made, and walk off! What have I got left?"
The Danites told him, "You had better not say anything else unless you want these men to get angry and attack you. You and your whole family would die."
Then the Danites went on. Micah saw that they were too strong for him, so he turned and went back home.
After the Danites had taken the priest and the things that Micah had made, they went and attacked Laish, that town of peaceful, quiet people which was in the same valley as Bethrehob. They killed the inhabitants and burned the town. There was no one to save them, because Laish was a long way from Sidon, and they had no dealings with any other people. The Danites rebuilt the town and settled down there.
They changed its name from Laish to Dan, after their ancestor Dan, the son of Jacob.
The Danites set up the idol to be worshiped, and Jonathan, the son of Gershom and grandson of Moses, served as a priest for the Danites, and his descendants served as their priests until the people were taken away into exile.
Micah's idol remained there as long as the Tent where God was worshiped remained at Shiloh.