Hajj literally means ‘to set out for a place’. Islamicly, however, it refers to the annual pilgrimage that Muslims make to Makkah with the intention of performing certain religious rites in accordance with the method prescribed by the Prophet Muhammad, may the mercy and blessings of God be upon him.
Hajj and its rites were first ordained by God in the time of the Prophet Abraham and he was the one who was entrusted by God to build the Kaaba – the House of God – along with his son Ishmael at Makkah. God described the Kaaba and its building as follows:
“And remember when We showed Abraham the site of the [Sacred] House [saying]: Associate not anything [in worship with Me and purify My House for those who circumambulate it [i.e. perform Tawaaf] and those who stand up for prayer and those who bow down and make prostration [in prayer etc.].” (Quran 22:26)
After building the Kaaba, Abraham would come to Makkah to perform Hajj every year, and after his death, this practice was continued by his son. However, gradually with the passage of time, both the form and the goal of the Hajj rites were changed. As idolatry spread throughout Arabia, the Kaaba lost its purity and idols were placed inside it. Its walls became covered with poems and paintings, including one of Jesus and his mother Maryand. Eventually over 360 idols came to be placed around the Kaaba.
During the Hajj period itself, the atmosphere around the sacred precincts of the Kaaba was like a circus. Men and women would go round the Kaaba naked, arguing that they should present themselves before God in the same condition they were born. Their prayer became devoid of all sincere remembrance of God and was instead reduced to a series of hand clapping, whistling and the blowing of horns. Even the Hajj call was distorted by them with the following additions: “No one is Your partner except one who is permitted by you. You are his Master and the Master of what he possesses.”
Sacrifices were also made in the name of God. However, the blood of the sacrificed animals was poured onto the walls of the Kaaba and the flesh was hung from pillars around the Kaaba, in the belief that God demanded the flesh and blood of these animals.
Singing, drinking, adultery and other acts of immorality was rife amongst the pilgrims and the poetry competitions, which were held, were a major part of the whole Hajj event. In these competitions, poets would praise the bravery and splendor of their own tribesmen and tell exaggerated tales of the cowardice and miserliness of other tribes. Competitions in generosity were also staged where the chief of each tribe would set up huge cauldrons and feed the pilgrims, only so that they could become well-known for their extreme generosity.
Thus the people had totally abandoned the teachings of their forefather and leader Abraham. The House that he had made pure for the worship of God alone, had been totally desecrated by the pagans and the rites which he had established were completely distorted by them. This sad state of affairs continued for nearly two and a half thousand years. But then after this long period, the time came for the supplication of Abraham to be answered:
“Our Lord! Send amongst them a Messenger of their own, who shall recite unto them your verses and instruct them in the book and the Wisdom and sanctify them. Verily you are the All-Mighty, the All-Wise.” (Quran 2:129)
Sure enough, a man by the name of Muhammad ibn ‘Abdullaah was born in the very city that Abraham had made this supplication centuries earlier. For twenty-three years, the Prophet Muhammad spread the message of monotheism – the same message that Abraham and all the other Prophets came with – and established the law of God upon the land. He expended every effort into making the word of God supreme and his victory over falsehood culminated in the smashing of the idols inside the Kaaba which once again became the universal centre for the worshippers of the one True God.
Not only did the Prophet rid the Kaaba of all its impurities, but he also reinstated all the rites of Hajj which were established by God’s Permission, in the time of Abraham. Specific injunctions in the Quran were revealed in order to eliminate all the false rites which had become rampant in the pre-Islamic period. All indecent and shameful acts were strictly banned in God’s statement:
“There is to be no lewdness nor wrangles during Hajj.” (Quran 2:197)
Competitions among poets in the exaltations of their forefathers and their tribesmen’s’ achievements were all stopped. Instead, God told them:
“And when you have completed your rites [of Hajj] then remember God as you remember your forefathers; nay with a more vigorous remembrance.” (Quran 2:200)
Competitions in generosity were also prohibited. Of course, the feeding of the poor pilgrims was still encouraged as this was done in the time of Abraham, but God commanded that the slaughtering of the animals which was done for this purpose should be done seeking the pleasure of God rather than fame and the praise of the people. He said:
“So mention the name of God over these animals when they are drawn up in lines. Then, when they are drawn on their sides [after the slaughter], eat thereof and feed the beggar who does not ask, and the beggar who asks.” (Quran 22:36)
As for the deplorable practice of spattering blood of the sacrificed animals on the walls of the Kaaba and hanging their flesh on altars, then God clearly informed them that:
“It is neither their meat nor their blood that reaches God, but it is Taqwaa (piety) from you that reaches Him.” (Quran 22:37)
The Prophet, may the mercy and blessings of God be upon him, also put a stop to the practice of circling the Kaaba in a state of nudity and the argument that the pagans put forward to justify this ritual was sharply rebutted in God’s question:
“Say: Who has forbidden the adornment [i.e. clothes] given by God which He has produced for His Slaves?” (Quran 7:32)
Another custom which was prohibited through the Quran was that of setting off for Hajj without taking any provisions for the journey. In the pre-Islamic period, some people who claimed righteousness, having total dependency on God, would travel to perform Hajj begging food the whole journey. They considered this form of behavior a sign of piety and an indication of how much faith they had in God. However God told mankind that to have sufficient provisions for the journey was one of the preconditions for making Hajj. He said:
“And take a provision [with you] for the journey, but the best provision is piety.” (Quran 2:197)
In this way, all the pre-Islamic practices, which were based in ignorance, were abolished and Hajj was once more made a model of piety, fear of God, purity, simplicity and austerity. Now, when the pilgrims reached the Kaaba, they no longer found the carnivals and the frolic and frivolity that had once occupied the minds of the pilgrims there before. Now, there was the remembrance of God at every step and every action and every sacrifice was devoted to Him alone. It was this kind of Hajj that was worthy of the reward of paradise, as the Prophet said:
“The reward for an accepted Hajj is nothing less than paradise.” (Saheeh Al-Bukhari)
Source : https://www.islamreligion.com/articles/663/history-of-hajj/