By looking at the history of Islam, and how close Imam Ali (a.s.) was to the holy Prophet (s.a.w.), and their frequent travelling, along with the victory of conquering Meccah al-Mukarramah, this leaves no doubt that Imam Ali (a.s.) performed Hajj, and visited the holy Ka'bah, which was his birthplace.
We can see the many instances of how Imam Ali (a.s.) describes Hajj, in Nahj al-Balaghah, and in other sources as well.
Furthermore, we know about the authentic mutawatir hadith of Hajjatul-Wida', where on their way back from the last Hajj, our beloved Prophet (s.a.w.) announced the succession and wilayah of Imam Ali (a.s.).
With prayers for your success.