People were persecuting them.
The Mormons left Illinois because Brigham Young, the new Mormon leader, heard about a great valley in the Utah desert, which at the time was still owned by Mexico. In 1847, he led a party of Mormons on a long, hazardous journey to the valley of the Great Salt Lake.
The Illinois government asked the Mormons to leave because their presence was causing too much unrest in the state.
Under their new leader Brigham Young the decision to leave Illinois was due directly to the murder of original Mormon Joseph Smith and his brother by a mob that attacked the jail where the two brothers were being held.
Utah. There are 77,000 baptized members of the Church of Jesus Christ of Latter-day Saints (commonly called the "Mormon" church) in New York, and 1,885,000 in Utah.
The Mormons moved west from New York to Ohio in 1831. They moved from Ohio to Missouri to Illinois, although not all at once so exact years can't be specified. They left Illinois to move to Utah in 1846.
The Mormons were receiving massive persecution, being moved from New York to Kirtland, to eventually Utah. So basically, they wanted a place to worship their religion in peace
The headquarters of the Church of Jesus Christ of Latter-day Saints (the "Mormon" church) moved from New York to Ohio to Missouri to Illinois and then to Utah in 1847. At that time, most Mormons lived near Church headquarters. Now, only about 10% of Mormons live near Church headquarters.
Joseph Smith is the one who directed the early Mormons to move from New York to Ohio and from Ohio to Missouri and Illinois. In Illinois, he prophesied that they would have to move to the Rocky Mountains to find peace, and plans were in place to make the move. It was not until after his murder, however, that they would travel to Utah. Brigham Young was the leader who made the call for everyone to pack up and move to Utah from Illinois.
The Mormons moved from New York to Ohio to Missouri to Illinois to Utah because they faced violent persecution and in some cases were kicked out of their homes or were asked to leave by the government. At the time that the Mormons arrived, Utah was only inhabited by a handful of (mostly friendly) Native American tribes and was outside the jurisdiction of the US Government, which meant that the Mormons could finally practice their religion in peace.
Mormons hoped to find a place where they could practice their religion freely without persecution. Between 1831 and 1847, they moved from New York to Ohio to Missouri to Illinois and finally to Utah in search of religious freedom.
Mormons immigrating to the United States from other countries (mostly Europe) had to check in at the New York immigration offices just like any other immigrant. It was and is the law that you must register with authorities when you move to a new country.
Mormons
Mormonism originated in New York. After a decade of preparation, which mostly took place in New York, the Church of Jesus Christ of Latter-day Saints (the "Mormon" church) was officially founded on April 6, 1830 in Fayette, New York.
No state called the Mormons, I don't know how that would be possible. The Church of Jesus Christ of Latter-day Saints (the "Mormon" church) was founded in upstate New York in 1830. A short time later, enemies of the church nicknamed them "Mormons", mocking their belief in the Book of Mormon. They have since embraced the nickname but still prefer that the full name of the church be used. Since 1830, Mormon Church headquarters has moved from New York to Ohio to Missouri to Illinois and finally to Utah, but the membership has been scattered around the country and worldwide. Today, about 40% of all Mormons live in the United States, and about 10% of all Mormons live in Utah.
After New York they ended up in Missouri and were persecuted. The governor, Lilburn Boggs wrote an Extermination order that said, "the Mormons must be treated as enemies and exterminated or driven forcefully out of the state." They were driven from there and ended up in Utah.