Mahanaim is a biblical Hebrew name. It was a place named by Jacob.
Genesis 32:1-2: Jacob also went on his way, and the angels of God met him. 2 When Jacob saw them, he said, “This is the camp of God!” So he named that place Mahanaim.
Jacob named the place “Mahanaim,” while he was in deep distress. He was worried to meet with his brother Esau whom he had unjustly stolen his inheritance, and feared that he could be harmed by him. In that situation the angels of God visited him and he was comforted. He named the place “Mahanaim,” which means “two camps”, or “camp in the camp.” This means that he pitched his tent in the heavenly army’s camp. From this very place Jacob was blessed by God and his original name of “Jacob” was changed to “Israel.”
In Joshua 21:38 Mahanaim was given as a portion to the tribe of Gad during the division of the land by Joshua and the place became a city of refuge for Gad’s clan. The cities of refuge represented Christ. They were cities of priests. People took refuge in them in order to be rescued. Whenever someone sinned a sin that deserved death, he needed only to run and reach the city.