Know that visiting the grave of the Prophet (peace be upon him) is neither obligatory nor a condition of Hajj as thought by some people. Rather, it is recommended for those who visit the Masjid (mosque) of the Prophet (peace be upon him) or are near to it.
As for those whose locations are remote from Madinah, they may not undertake a journey to visit the grave. Rather, they do not have to undertake a journey with the intention of visiting the Honorable Masjid. After reaching the Masjid, they may visit the honorable grave and the graves of the two Companions. Thus, visiting the grave of the Prophet (peace be upon him) follows visiting the Masjid. It isauthentically reported in the Two Sahih (authentic) Books of Hadith (i.e. Al-Bukhari and Muslim)that the Prophet (peace be upon him) said: "Do not set out on a journey but to three Masjids: Al-Masjid al-Haram (the Sacred Mosque), this Masjid of mine (the Prophet's Mosque), and Al-Aqsa Masjid (in Jerusalem)."
Had undertaking a journey with the intention of visiting the grave of the Prophet (peace be upon him) or anyone else been permissible, he would have instructed the Ummah to do so highlighting the excellence of such an act. This is because he is the most sincere adviser and the most knowledgeable about and fearful of Allah (Exalted be He). He conveyed his message clearly and guided his Ummah to all that is good and warned them against all that is evil. Undoubtedly, he warned against undertaking a journey to other than those three Masjids and also said: "Do not make my grave a place of celebration and do not make your houses graves, but invoke blessings on me, for your blessings reach me wherever you may be."
However, the view that it is permissible to undertake a journey with the intention of visiting the grave of the Prophet (peace be upon him) will lead to making it a place of celebrity and will cause forbidden things to occur that the Prophet (peace be upon him) warned against i.e. exaggeration and overestimation. Actually, many people have made this mistake because they thought it is permissible to undertake a journey with the intention of visiting the grave of the Prophet (peace be upon him).
The Hadiths that support the view that undertaking a journey to visit the grave of the Prophet (peace be upon him) is permissible are Da`if (weak) or even fabricated Hadith as judged by such memorizers as Al-Daraqutny, Al-Bayhaqy, Al-Hafizh (memorizer) Ibn Hajar and others. Therefore, they may not refute the authority of authentic Hadith indicating the prohibition of undertaking a journey to visit other than the three Masjids.
Following I cite some fabricated Hadith on the issue so that you may know them and thus be warned against being deceived:
First: "Whoever performs Hajj without visiting my grave will be deserting me."
Second: "Whoever visits my grave after I die will be as if he visited me when I was still alive."
Thrid: "Whoever visits my grave and the grave of my forefather Ibrahim (Abraham) in the same year, I will guarantee Paradise for him with Allah."
Fourth: "Whoever visits my grave, my intercession will be guaranteed for him."
Such Hadiths are not authentically reported from the Prophet (peace be upon him).
Al-Hafizh Ibn Hajar said in Al-Talkhis - after quoting most narrations: All the chains of narrators through which these Hadiths are reported are weak.Moreover, Al-Hafizh Al-`Aqily said: All Hadiths quoted to this effect are not authentic.
Furthermore, Shaykh-ul-Islam Ibn Taymiyyah (may Allah be merciful with him) was decisive that all such Hadith are fabricated. Undoubtedly, he is an authority as regards knowledge, memorizing and scholarly research.
Had any of these Hadith been authentic, the Companions (may Allah be pleased with them) would have been the first to do so and would have advised the Ummah to do so, for they are the best people, second in rank only to the prophets. Moreover, they are the most knowledgeable about Allah's boundaries and legislations and are the most sincere advisers for people. Since they are not reported to have done so, it is an indication that it is impermissible.
Even if any of them is authentic, it should be understood within the context of Shar`y (Islamic legal) visit that is not with the intention of visiting merely the grave of the Prophet (peace be upon him). This is meant to reconcile all the Hadith. And Allah knows best.
[Advice by Shaykh Ibn Baaz - Alifta.net]