All perfect praise is due to Allah, The Lord of The Worlds; and may His peace and blessings be upon Prophet Mohammad and upon all his family and companions.
If you wanted to enter Makkah intending to perform Umrah in Tamattu` type of Hajj, assumed Ihram from the Miqat of your country and performed the rituals of Umrah, then the rules of Tamattu` Hajj apply to you. As a result, you are permitted to assume Ihram for Hajj from Makkah and without the condition of staying for a certain period in Makkah.
[Umdat Assalik], a Shafite book, stated: "The Hajj Miqat for one who is in Makkah, even if he was passing through, is Makkah, and the Miqat of his Umrah is Al-Hill (the area outside the sanctuary)."
However, if you intended to perform the Ifraad type of Hajj, you are obliged to assume Ihram from the Miqat of your country and not from Makkah. Even if you arrive in Makkah early, you are not allowed to pass the Miqat without assuming Ihram, because you have entered Makkah with the intention of performing Hajj. Narrated Ibn `Abbas: "
The Prophet (PBUH) fixed Dhul-Hulaifa as the Miqat for the people of Medina, Al-Juhfa, for the people of Sham, Yalamlam for the people of Yemen, and Qarn for the people of Najd. And these Mawaqit are for those living at those very places, and besides them for those who come through those places with the intention of performing Hajj and Umra; and whoever is living inside these places can assume lhram from his own dwelling place, and the people of Mecca can assume lhram from Mecca." {Bukhari&Muslim}. And Allah knows best.