Sidhu said his political differences with the prime minister did not matter and he was sending him a "Munnabhai MBBS-style hug".
"I am thanking Modi ji also, it doesn't matter if we have political differences, doesn't matter if my life is dedicated to Gandhi family, I am sending a Munnabhai MBBS-style hug to you Modi sahab for this."
Munnabhai MBSS is title of a popular movie.
Sidhu was granted political clearance by the Indian government to visit Gurudwara Kartarpur Sahib through the corridor.
Sidhu, a former BJP MP had quit the party to join the Congress.
He was a minister in the government headed by Chief Minister Captain Amarinder Singh.
Sidhu's visit to Pakistan in 2018 for sweaing in of Khan had evoked criticism after he hugged the Pakistani Army Chief General Qamar Javed Bajwa.
Modi, who inaugurated the Integrated Check Post of Kartarpur Corridor at Dera Baba Nanak in Gurdaspur on Saturday had thanked his Pakistani counterpart Imran Khan for respecting the sentiments of the people of India.
India and Pakistan had on October 24 signed an agreement on the modalities for operationalising Kartarpur Sahib Corridor, paving the way for its inauguration ahead of the 550th birth anniversary of the Sikh faith founder Guru Nanak Dev.